home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1993-12-13 | 49.1 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Mon Dec 13 10:51:28 1993, modified Mon Dec 13 10:51:28 1993, creator Think C, type ASCII, 49600 bytes "EditWindow.c" , at 0xc240 480 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 45 64 69 74 57 69 | 6e 64 6f 77 2e 63 00 00 |..EditWi|ndow.c..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 c1 c0 00 | 00 01 e0 a9 32 40 00 a9 |........|....2@..|
|00000060| 32 40 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |2@......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 f7 32 00 00 |........|.....2..|
|00000080| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000c0| 2a 2a 2a 2a 2a 2a 0d 20 | 2a 20 45 64 69 74 57 69 |******. |* EditWi|
|000000d0| 6e 64 6f 77 2e 63 0d 20 | 2a 0d 20 2a 20 48 65 78 |ndow.c. |*. * Hex|
|000000e0| 45 64 69 74 2c 20 61 20 | 73 69 6d 70 6c 65 20 68 |Edit, a |simple h|
|000000f0| 65 78 20 65 64 69 74 6f | 72 0d 20 2a 20 63 6f 70 |ex edito|r. * cop|
|00000100| 79 72 69 67 68 74 20 31 | 39 39 33 2c 20 4a 69 6d |yright 1|993, Jim|
|00000110| 20 42 75 6d 67 61 72 64 | 6e 65 72 0d 20 2a 2a 2a | Bumgard|ner. ***|
|00000120| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000130| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000140| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000150| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000160| 2a 2a 2f 0d 23 69 6e 63 | 6c 75 64 65 20 22 48 65 |**/.#inc|lude "He|
|00000170| 78 45 64 69 74 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |xEdit.h"|.#includ|
|00000180| 65 20 22 46 6f 6c 64 65 | 72 73 2e 68 22 0d 23 69 |e "Folde|rs.h".#i|
|00000190| 6e 63 6c 75 64 65 20 3c | 73 74 64 69 6f 2e 68 3e |nclude <|stdio.h>|
|000001a0| 0d 0d 2f 2f 20 43 72 65 | 61 74 65 20 61 20 6e 65 |..// Cre|ate a ne|
|000001b0| 77 20 6d 61 69 6e 20 77 | 69 6e 64 6f 77 20 75 73 |w main w|indow us|
|000001c0| 69 6e 67 20 61 20 27 57 | 49 4e 44 27 20 74 65 6d |ing a 'W|IND' tem|
|000001d0| 70 6c 61 74 65 20 66 72 | 6f 6d 20 74 68 65 20 72 |plate fr|om the r|
|000001e0| 65 73 6f 75 72 63 65 20 | 66 6f 72 6b 0d 2f 2f 0d |esource |fork.//.|
|000001f0| 0d 42 6f 6f 6c 65 61 6e | 20 09 09 67 43 75 72 73 |.Boolean| ..gCurs|
|00000200| 6f 72 46 6c 61 67 3b 0d | 52 65 63 74 09 09 09 67 |orFlag;.|Rect...g|
|00000210| 43 75 72 73 52 65 63 74 | 3b 0d 42 69 74 4d 61 70 |CursRect|;.BitMap|
|00000220| 09 09 09 67 42 69 74 4d | 61 70 3b 0d 50 72 65 66 |...gBitM|ap;.Pref|
|00000230| 65 72 65 6e 63 65 73 09 | 09 67 50 72 65 66 73 20 |erences.|.gPrefs |
|00000240| 3d 20 7b 41 4d 5f 4c 6f | 2c 20 66 61 6c 73 65 2c |= {AM_Lo|, false,|
|00000250| 20 74 72 75 65 7d 3b 0d | 73 68 6f 72 74 09 09 09 | true};.|short...|
|00000260| 67 46 6f 72 6b 4d 6f 64 | 65 3d 46 4d 5f 53 6d 61 |gForkMod|e=FM_Sma|
|00000270| 72 74 2c 67 48 69 67 68 | 43 68 61 72 3d 27 7e 27 |rt,gHigh|Char='~'|
|00000280| 2c 67 4f 76 65 72 77 72 | 69 74 65 3b 0d 54 48 50 |,gOverwr|ite;.THP|
|00000290| 72 69 6e 74 09 09 09 67 | 48 50 72 69 6e 74 3b 0d |rint...g|HPrint;.|
|000002a0| 73 74 61 74 69 63 20 63 | 68 61 72 09 09 67 42 75 |static c|har..gBu|
|000002b0| 66 66 65 72 5b 38 30 5d | 3b 0d 43 75 72 73 6f 72 |ffer[80]|;.Cursor|
|000002c0| 09 09 09 67 57 61 74 63 | 68 43 75 72 73 6f 72 2c |...gWatc|hCursor,|
|000002d0| 67 49 42 65 61 6d 43 75 | 72 73 6f 72 3b 0d 73 68 |gIBeamCu|rsor;.sh|
|000002e0| 6f 72 74 09 09 09 67 4d | 61 78 48 65 69 67 68 74 |ort...gM|axHeight|
|000002f0| 3d 33 34 32 3b 0d 0d 76 | 6f 69 64 20 4c 6f 61 64 |=342;..v|oid Load|
|00000300| 50 72 65 66 65 72 65 6e | 63 65 73 28 76 6f 69 64 |Preferen|ces(void|
|00000310| 29 0d 7b 0d 09 48 61 6e | 64 6c 65 09 68 3b 0d 09 |).{..Han|dle.h;..|
|00000320| 68 20 3d 20 47 65 74 52 | 65 73 6f 75 72 63 65 28 |h = GetR|esource(|
|00000330| 50 72 65 66 52 65 73 54 | 79 70 65 2c 20 50 72 65 |PrefResT|ype, Pre|
|00000340| 66 52 65 73 49 44 29 3b | 0d 09 69 66 20 28 68 20 |fResID);|..if (h |
|00000350| 3d 3d 20 4e 55 4c 4c 20 | 7c 7c 20 52 65 73 45 72 |== NULL ||| ResEr|
|00000360| 72 6f 72 28 29 29 0d 09 | 09 72 65 74 75 72 6e 3b |ror())..|.return;|
|00000370| 0d 09 42 6c 6f 63 6b 4d | 6f 76 65 28 2a 68 2c 20 |..BlockM|ove(*h, |
|00000380| 26 67 50 72 65 66 73 2c | 20 73 69 7a 65 6f 66 28 |&gPrefs,| sizeof(|
|00000390| 50 72 65 66 65 72 65 6e | 63 65 73 29 29 3b 0d 09 |Preferen|ces));..|
|000003a0| 52 65 6c 65 61 73 65 52 | 65 73 6f 75 72 63 65 28 |ReleaseR|esource(|
|000003b0| 68 29 3b 0d 09 69 66 20 | 28 67 50 72 65 66 73 2e |h);..if |(gPrefs.|
|000003c0| 61 73 63 69 69 4d 6f 64 | 65 29 0d 09 09 67 48 69 |asciiMod|e)...gHi|
|000003d0| 67 68 43 68 61 72 20 3d | 20 32 35 35 3b 0d 09 65 |ghChar =| 255;..e|
|000003e0| 6c 73 65 0d 09 09 67 48 | 69 67 68 43 68 61 72 20 |lse...gH|ighChar |
|000003f0| 3d 20 27 7e 27 3b 0d 7d | 0d 0d 76 6f 69 64 20 53 |= '~';.}|..void S|
|00000400| 61 76 65 50 72 65 66 65 | 72 65 6e 63 65 73 28 76 |avePrefe|rences(v|
|00000410| 6f 69 64 29 0d 7b 0d 09 | 48 61 6e 64 6c 65 09 68 |oid).{..|Handle.h|
|00000420| 3b 0d 09 77 68 69 6c 65 | 20 28 28 68 20 3d 20 47 |;..while| ((h = G|
|00000430| 65 74 52 65 73 6f 75 72 | 63 65 28 50 72 65 66 52 |etResour|ce(PrefR|
|00000440| 65 73 54 79 70 65 2c 20 | 50 72 65 66 52 65 73 49 |esType, |PrefResI|
|00000450| 44 29 29 20 21 3d 20 4e | 55 4c 4c 29 20 7b 0d 09 |D)) != N|ULL) {..|
|00000460| 09 52 6d 76 65 52 65 73 | 6f 75 72 63 65 28 68 29 |.RmveRes|ource(h)|
|00000470| 3b 0d 09 09 44 69 73 70 | 6f 73 48 61 6e 64 6c 65 |;...Disp|osHandle|
|00000480| 28 68 29 3b 0d 09 7d 0d | 09 68 20 3d 20 4e 65 77 |(h);..}.|.h = New|
|00000490| 48 61 6e 64 6c 65 28 73 | 69 7a 65 6f 66 28 50 72 |Handle(s|izeof(Pr|
|000004a0| 65 66 65 72 65 6e 63 65 | 73 29 29 3b 0d 09 69 66 |eference|s));..if|
|000004b0| 20 28 68 20 3d 3d 20 4e | 55 4c 4c 29 20 7b 0d 09 | (h == N|ULL) {..|
|000004c0| 09 45 72 72 6f 72 41 6c | 65 72 74 28 45 53 5f 43 |.ErrorAl|ert(ES_C|
|000004d0| 61 75 74 69 6f 6e 2c 22 | 4e 6f 74 20 65 6e 6f 75 |aution,"|Not enou|
|000004e0| 67 68 20 6d 65 6d 6f 72 | 79 22 29 3b 0d 09 7d 0d |gh memor|y");..}.|
|000004f0| 09 65 6c 73 65 20 7b 0d | 09 09 42 6c 6f 63 6b 4d |.else {.|..BlockM|
|00000500| 6f 76 65 28 26 67 50 72 | 65 66 73 2c 20 2a 68 2c |ove(&gPr|efs, *h,|
|00000510| 20 73 69 7a 65 6f 66 28 | 50 72 65 66 65 72 65 6e | sizeof(|Preferen|
|00000520| 63 65 73 29 29 3b 0d 09 | 09 41 64 64 52 65 73 6f |ces));..|.AddReso|
|00000530| 75 72 63 65 28 68 2c 50 | 72 65 66 52 65 73 54 79 |urce(h,P|refResTy|
|00000540| 70 65 2c 50 72 65 66 52 | 65 73 49 44 2c 22 5c 70 |pe,PrefR|esID,"\p|
|00000550| 50 72 65 66 65 72 65 6e | 63 65 73 22 29 3b 0d 09 |Preferen|ces");..|
|00000560| 09 57 72 69 74 65 52 65 | 73 6f 75 72 63 65 28 68 |.WriteRe|source(h|
|00000570| 29 3b 0d 09 09 52 65 6c | 65 61 73 65 52 65 73 6f |);...Rel|easeReso|
|00000580| 75 72 63 65 28 68 29 3b | 0d 09 7d 0d 7d 0d 0d 76 |urce(h);|..}.}..v|
|00000590| 6f 69 64 20 49 6e 69 74 | 69 61 6c 69 7a 65 45 64 |oid Init|ializeEd|
|000005a0| 69 74 6f 72 28 29 0d 7b | 0d 09 52 65 63 74 09 09 |itor().{|..Rect..|
|000005b0| 09 09 6f 66 66 52 65 63 | 74 3b 0d 09 4f 53 45 72 |..offRec|t;..OSEr|
|000005c0| 72 09 09 09 09 6f 65 3b | 0d 09 43 75 72 73 48 61 |r....oe;|..CursHa|
|000005d0| 6e 64 6c 65 09 09 09 63 | 48 20 3d 20 4e 55 4c 4c |ndle...c|H = NULL|
|000005e0| 3b 0d 0d 09 69 66 20 28 | 53 63 72 61 70 49 6e 66 |;...if (|ScrapInf|
|000005f0| 6f 2e 73 63 72 61 70 53 | 74 61 74 65 20 3c 20 30 |o.scrapS|tate < 0|
|00000600| 29 0d 09 09 5a 65 72 6f | 53 63 72 61 70 28 29 3b |)...Zero|Scrap();|
|00000610| 0d 0d 09 2f 2f 20 53 74 | 61 72 74 20 50 72 6f 66 |...// St|art Prof|
|00000620| 69 6c 69 6e 67 0d 23 69 | 66 20 50 52 4f 46 49 4c |iling.#i|f PROFIL|
|00000630| 45 09 09 09 2f 2f 20 36 | 2f 31 35 20 4f 70 74 69 |E...// 6|/15 Opti|
|00000640| 6f 6e 61 6c 20 70 72 6f | 66 69 6c 69 6e 67 20 73 |onal pro|filing s|
|00000650| 75 70 70 6f 72 74 0d 09 | 66 72 65 6f 70 65 6e 28 |upport..|freopen(|
|00000660| 22 70 72 6f 66 69 6c 65 | 2e 6c 6f 67 22 2c 22 77 |"profile|.log","w|
|00000670| 22 2c 73 74 64 6f 75 74 | 29 3b 09 09 2f 2f 20 49 |",stdout|);..// I|
|00000680| 66 20 63 6f 6e 73 6f 6c | 65 20 69 73 6e 27 74 20 |f consol|e isn't |
|00000690| 77 61 6e 74 65 64 0d 09 | 49 6e 69 74 50 72 6f 66 |wanted..|InitProf|
|000006a0| 69 6c 65 28 32 30 30 2c | 32 30 30 29 3b 0d 09 5f |ile(200,|200);.._|
|000006b0| 70 72 6f 66 69 6c 65 20 | 3d 20 30 3b 0d 09 2f 2f |profile |= 0;..//|
|000006c0| 20 63 65 63 68 6f 32 66 | 69 6c 65 28 22 70 72 6f | cecho2f|ile("pro|
|000006d0| 66 69 6c 65 2e 6c 6f 67 | 22 2c 66 61 6c 73 65 2c |file.log|",false,|
|000006e0| 73 74 64 6f 75 74 29 3b | 09 2f 2f 20 49 66 20 63 |stdout);|.// If c|
|000006f0| 6f 6e 73 6f 6c 65 20 69 | 73 20 77 61 6e 74 65 64 |onsole i|s wanted|
|00000700| 0d 23 65 6e 64 69 66 0d | 09 67 4d 61 78 48 65 69 |.#endif.|.gMaxHei|
|00000710| 67 68 74 20 3d 20 73 63 | 72 65 65 6e 42 69 74 73 |ght = sc|reenBits|
|00000720| 2e 62 6f 75 6e 64 73 2e | 62 6f 74 74 6f 6d 20 2d |.bounds.|bottom -|
|00000730| 20 73 63 72 65 65 6e 42 | 69 74 73 2e 62 6f 75 6e | screenB|its.boun|
|00000740| 64 73 2e 74 6f 70 3b 0d | 09 69 66 20 28 67 4d 61 |ds.top;.|.if (gMa|
|00000750| 78 48 65 69 67 68 74 20 | 3c 20 33 34 32 29 0d 09 |xHeight |< 342)..|
|00000760| 09 67 4d 61 78 48 65 69 | 67 68 74 20 3d 20 33 34 |.gMaxHei|ght = 34|
|00000770| 32 3b 0d 09 53 65 74 52 | 65 63 74 28 26 6f 66 66 |2;..SetR|ect(&off|
|00000780| 52 65 63 74 2c 30 2c 30 | 2c 4d 61 78 57 69 6e 64 |Rect,0,0|,MaxWind|
|00000790| 6f 77 57 69 64 74 68 2c | 67 4d 61 78 48 65 69 67 |owWidth,|gMaxHeig|
|000007a0| 68 74 29 3b 0d 09 67 42 | 69 74 4d 61 70 2e 72 6f |ht);..gB|itMap.ro|
|000007b0| 77 42 79 74 65 73 20 3d | 20 28 28 28 4d 61 78 57 |wBytes =| (((MaxW|
|000007c0| 69 6e 64 6f 77 57 69 64 | 74 68 2d 31 29 2f 33 32 |indowWid|th-1)/32|
|000007d0| 29 2b 31 29 2a 34 3b 0d | 09 67 42 69 74 4d 61 70 |)+1)*4;.|.gBitMap|
|000007e0| 2e 62 61 73 65 41 64 64 | 72 20 3d 20 4e 65 77 50 |.baseAdd|r = NewP|
|000007f0| 74 72 43 6c 65 61 72 28 | 20 28 6c 6f 6e 67 29 20 |trClear(| (long) |
|00000800| 67 42 69 74 4d 61 70 2e | 72 6f 77 42 79 74 65 73 |gBitMap.|rowBytes|
|00000810| 20 2a 20 67 4d 61 78 48 | 65 69 67 68 74 20 29 3b | * gMaxH|eight );|
|00000820| 0d 09 69 66 20 28 67 42 | 69 74 4d 61 70 2e 62 61 |..if (gB|itMap.ba|
|00000830| 73 65 41 64 64 72 20 3d | 3d 20 4e 55 4c 4c 29 0d |seAddr =|= NULL).|
|00000840| 09 09 45 72 72 6f 72 41 | 6c 65 72 74 28 45 53 5f |..ErrorA|lert(ES_|
|00000850| 53 74 6f 70 2c 22 4e 6f | 74 20 65 6e 6f 75 67 68 |Stop,"No|t enough|
|00000860| 20 6d 65 6d 6f 72 79 22 | 29 3b 0d 09 67 42 69 74 | memory"|);..gBit|
|00000870| 4d 61 70 2e 62 6f 75 6e | 64 73 20 3d 20 6f 66 66 |Map.boun|ds = off|
|00000880| 52 65 63 74 3b 0d 0d 09 | 63 48 20 3d 20 47 65 74 |Rect;...|cH = Get|
|00000890| 43 75 72 73 6f 72 28 77 | 61 74 63 68 43 75 72 73 |Cursor(w|atchCurs|
|000008a0| 6f 72 29 3b 0d 09 69 66 | 20 28 63 48 29 0d 09 09 |or);..if| (cH)...|
|000008b0| 67 57 61 74 63 68 43 75 | 72 73 6f 72 20 3d 20 2a |gWatchCu|rsor = *|
|000008c0| 2a 63 48 3b 0d 09 63 48 | 20 3d 20 47 65 74 43 75 |*cH;..cH| = GetCu|
|000008d0| 72 73 6f 72 28 69 42 65 | 61 6d 43 75 72 73 6f 72 |rsor(iBe|amCursor|
|000008e0| 29 3b 0d 09 69 66 20 28 | 63 48 29 0d 09 09 67 49 |);..if (|cH)...gI|
|000008f0| 42 65 61 6d 43 75 72 73 | 6f 72 20 3d 20 2a 2a 63 |BeamCurs|or = **c|
|00000900| 48 3b 0d 0d 09 50 72 4f | 70 65 6e 28 29 3b 0d 09 |H;...PrO|pen();..|
|00000910| 67 48 50 72 69 6e 74 20 | 3d 20 28 54 48 50 72 69 |gHPrint |= (THPri|
|00000920| 6e 74 29 20 4e 65 77 48 | 61 6e 64 6c 65 28 73 69 |nt) NewH|andle(si|
|00000930| 7a 65 6f 66 28 54 50 72 | 69 6e 74 29 29 3b 0d 09 |zeof(TPr|int));..|
|00000940| 69 66 20 28 67 48 50 72 | 69 6e 74 20 3d 3d 20 4e |if (gHPr|int == N|
|00000950| 55 4c 4c 29 20 7b 0d 09 | 09 45 72 72 6f 72 41 6c |ULL) {..|.ErrorAl|
|00000960| 65 72 74 28 45 53 5f 53 | 74 6f 70 2c 22 4e 6f 74 |ert(ES_S|top,"Not|
|00000970| 20 65 6e 6f 75 67 68 20 | 6d 65 6d 6f 72 79 22 29 | enough |memory")|
|00000980| 3b 0d 09 7d 0d 09 50 72 | 69 6e 74 44 65 66 61 75 |;..}..Pr|intDefau|
|00000990| 6c 74 28 67 48 50 72 69 | 6e 74 29 3b 0d 09 50 72 |lt(gHPri|nt);..Pr|
|000009a0| 43 6c 6f 73 65 28 29 3b | 0d 0d 09 4c 6f 61 64 50 |Close();|...LoadP|
|000009b0| 72 65 66 65 72 65 6e 63 | 65 73 28 29 3b 0d 7d 0d |referenc|es();.}.|
|000009c0| 0d 76 6f 69 64 20 43 6c | 65 61 6e 75 70 45 64 69 |.void Cl|eanupEdi|
|000009d0| 74 6f 72 28 29 0d 7b 0d | 09 69 66 20 28 67 42 69 |tor().{.|.if (gBi|
|000009e0| 74 4d 61 70 2e 62 61 73 | 65 41 64 64 72 29 20 7b |tMap.bas|eAddr) {|
|000009f0| 0d 09 09 44 69 73 70 6f | 73 65 50 74 72 28 67 42 |...Dispo|sePtr(gB|
|00000a00| 69 74 4d 61 70 2e 62 61 | 73 65 41 64 64 72 29 3b |itMap.ba|seAddr);|
|00000a10| 0d 09 09 67 42 69 74 4d | 61 70 2e 62 61 73 65 41 |...gBitM|ap.baseA|
|00000a20| 64 64 72 20 3d 20 4e 55 | 4c 4c 3b 0d 09 7d 0d 09 |ddr = NU|LL;..}..|
|00000a30| 53 61 76 65 50 72 65 66 | 65 72 65 6e 63 65 73 28 |SavePref|erences(|
|00000a40| 29 3b 0d 7d 0d 0d 76 6f | 69 64 20 4e 65 77 45 64 |);.}..vo|id NewEd|
|00000a50| 69 74 57 69 6e 64 6f 77 | 28 76 6f 69 64 29 0d 7b |itWindow|(void).{|
|00000a60| 0d 09 57 69 6e 64 6f 77 | 50 74 72 09 09 09 74 68 |..Window|Ptr...th|
|00000a70| 65 57 69 6e 64 6f 77 3b | 0d 09 45 64 69 74 57 69 |eWindow;|..EditWi|
|00000a80| 6e 64 6f 77 50 74 72 09 | 09 64 57 69 6e 3b 0d 09 |ndowPtr.|.dWin;..|
|00000a90| 4f 53 45 72 72 09 09 09 | 09 6f 65 3b 0d 09 73 68 |OSErr...|.oe;..sh|
|00000aa0| 6f 72 74 09 09 09 09 72 | 65 66 4e 75 6d 3d 30 3b |ort....r|efNum=0;|
|00000ab0| 0d 09 50 6f 69 6e 74 09 | 09 09 09 77 68 65 72 65 |..Point.|...where|
|00000ac0| 3d 7b 2d 31 2c 2d 31 7d | 3b 0d 09 48 50 61 72 61 |={-1,-1}|;..HPara|
|00000ad0| 6d 42 6c 6f 63 6b 52 65 | 63 09 09 70 62 3b 0d 09 |mBlockRe|c..pb;..|
|00000ae0| 46 53 53 70 65 63 09 09 | 09 09 77 6f 72 6b 53 70 |FSSpec..|..workSp|
|00000af0| 65 63 3b 0d 09 52 65 63 | 74 09 09 09 09 72 3b 0d |ec;..Rec|t....r;.|
|00000b00| 0d 09 2f 2f 20 47 65 74 | 20 74 68 65 20 54 65 6d |..// Get| the Tem|
|00000b10| 70 6c 61 74 65 20 26 20 | 43 72 65 61 74 65 20 74 |plate & |Create t|
|00000b20| 68 65 20 57 69 6e 64 6f | 77 2c 20 69 74 20 69 73 |he Windo|w, it is|
|00000b30| 20 73 65 74 20 75 70 20 | 69 6e 20 74 68 65 20 72 | set up |in the r|
|00000b40| 65 73 6f 75 72 63 65 20 | 66 6f 72 6b 0d 09 2f 2f |esource |fork..//|
|00000b50| 20 74 6f 20 6e 6f 74 20 | 62 65 20 69 6e 69 74 69 | to not |be initi|
|00000b60| 61 6c 6c 79 20 76 69 73 | 69 62 6c 65 20 0d 0d 09 |ally vis|ible ...|
|00000b70| 64 57 69 6e 20 3d 20 28 | 45 64 69 74 57 69 6e 64 |dWin = (|EditWind|
|00000b80| 6f 77 50 74 72 29 20 4e | 65 77 50 74 72 43 6c 65 |owPtr) N|ewPtrCle|
|00000b90| 61 72 28 73 69 7a 65 6f | 66 28 45 64 69 74 57 69 |ar(sizeo|f(EditWi|
|00000ba0| 6e 64 6f 77 52 65 63 6f | 72 64 29 29 3b 0d 09 69 |ndowReco|rd));..i|
|00000bb0| 66 20 28 64 57 69 6e 20 | 3d 3d 20 4e 55 4c 4c 29 |f (dWin |== NULL)|
|00000bc0| 20 7b 0d 09 09 46 53 43 | 6c 6f 73 65 28 72 65 66 | {...FSC|lose(ref|
|00000bd0| 4e 75 6d 29 3b 0d 09 09 | 45 72 72 6f 72 41 6c 65 |Num);...|ErrorAle|
|00000be0| 72 74 28 45 53 5f 43 61 | 75 74 69 6f 6e 2c 20 22 |rt(ES_Ca|ution, "|
|00000bf0| 43 61 6e 27 74 20 61 6c | 6c 6f 63 61 74 65 20 6e |Can't al|locate n|
|00000c00| 65 77 20 77 69 6e 64 6f | 77 22 29 3b 0d 09 09 72 |ew windo|w");...r|
|00000c10| 65 74 75 72 6e 3b 0d 09 | 7d 0d 0d 09 64 57 69 6e |eturn;..|}...dWin|
|00000c20| 2d 3e 66 6f 72 6b 20 3d | 20 46 54 5f 44 61 74 61 |->fork =| FT_Data|
|00000c30| 3b 0d 09 64 57 69 6e 2d | 3e 66 69 6c 65 53 69 7a |;..dWin-|>fileSiz|
|00000c40| 65 20 3d 20 30 4c 3b 0d | 09 64 57 69 6e 2d 3e 72 |e = 0L;.|.dWin->r|
|00000c50| 65 66 4e 75 6d 20 3d 20 | 30 3b 0d 0d 09 2f 2f 20 |efNum = |0;...// |
|00000c60| 49 6e 69 74 69 61 6c 69 | 7a 65 20 57 6f 72 6b 53 |Initiali|ze WorkS|
|00000c70| 70 65 63 0d 09 77 6f 72 | 6b 53 70 65 63 20 3d 20 |pec..wor|kSpec = |
|00000c80| 64 57 69 6e 2d 3e 77 6f | 72 6b 53 70 65 63 3b 0d |dWin->wo|rkSpec;.|
|00000c90| 09 6f 65 20 3d 20 46 69 | 6e 64 46 6f 6c 64 65 72 |.oe = Fi|ndFolder|
|00000ca0| 28 2d 31 2c 20 6b 54 65 | 6d 70 6f 72 61 72 79 46 |(-1, kTe|mporaryF|
|00000cb0| 6f 6c 64 65 72 54 79 70 | 65 2c 20 6b 43 72 65 61 |olderTyp|e, kCrea|
|00000cc0| 74 65 46 6f 6c 64 65 72 | 2c 20 0d 09 09 09 09 09 |teFolder|, ......|
|00000cd0| 26 77 6f 72 6b 53 70 65 | 63 2e 76 52 65 66 4e 75 |&workSpe|c.vRefNu|
|00000ce0| 6d 2c 0d 09 09 09 09 09 | 26 77 6f 72 6b 53 70 65 |m,......|&workSpe|
|00000cf0| 63 2e 70 61 72 49 44 29 | 3b 0d 09 69 66 20 28 6f |c.parID)|;..if (o|
|00000d00| 65 20 21 3d 20 6e 6f 45 | 72 72 29 20 7b 0d 09 09 |e != noE|rr) {...|
|00000d10| 4f 53 45 72 72 6f 72 41 | 6c 65 72 74 28 45 53 5f |OSErrorA|lert(ES_|
|00000d20| 43 61 75 74 69 6f 6e 2c | 20 22 46 69 6e 64 46 6f |Caution,| "FindFo|
|00000d30| 6c 64 65 72 22 2c 20 6f | 65 29 3b 0d 09 09 72 65 |lder", o|e);...re|
|00000d40| 74 75 72 6e 3b 0d 09 7d | 0d 09 42 6c 6f 63 6b 4d |turn;..}|..BlockM|
|00000d50| 6f 76 65 28 22 5c 70 55 | 6e 74 69 74 6c 65 64 77 |ove("\pU|ntitledw|
|00000d60| 22 2c 20 77 6f 72 6b 53 | 70 65 63 2e 6e 61 6d 65 |", workS|pec.name|
|00000d70| 2c 20 31 30 29 3b 0d 09 | 49 6e 73 75 72 65 4e 61 |, 10);..|InsureNa|
|00000d80| 6d 65 49 73 55 6e 69 71 | 75 65 28 26 77 6f 72 6b |meIsUniq|ue(&work|
|00000d90| 53 70 65 63 29 3b 0d 09 | 48 43 72 65 61 74 65 28 |Spec);..|HCreate(|
|00000da0| 77 6f 72 6b 53 70 65 63 | 2e 76 52 65 66 4e 75 6d |workSpec|.vRefNum|
|00000db0| 2c 77 6f 72 6b 53 70 65 | 63 2e 70 61 72 49 44 2c |,workSpe|c.parID,|
|00000dc0| 77 6f 72 6b 53 70 65 63 | 2e 6e 61 6d 65 2c 43 52 |workSpec|.name,CR|
|00000dd0| 45 41 54 4f 52 2c 20 27 | 3f 3f 3f 3f 27 29 3b 0d |EATOR, '|????');.|
|00000de0| 09 69 66 20 28 6f 65 20 | 21 3d 20 6e 6f 45 72 72 |.if (oe |!= noErr|
|00000df0| 29 20 7b 0d 09 09 4f 53 | 45 72 72 6f 72 41 6c 65 |) {...OS|ErrorAle|
|00000e00| 72 74 28 45 53 5f 43 61 | 75 74 69 6f 6e 2c 20 22 |rt(ES_Ca|ution, "|
|00000e10| 48 43 72 65 61 74 65 22 | 2c 20 6f 65 29 3b 0d 09 |HCreate"|, oe);..|
|00000e20| 09 72 65 74 75 72 6e 3b | 0d 09 7d 0d 09 6f 65 20 |.return;|..}..oe |
|00000e30| 3d 20 48 4f 70 65 6e 28 | 77 6f 72 6b 53 70 65 63 |= HOpen(|workSpec|
|00000e40| 2e 76 52 65 66 4e 75 6d | 2c 77 6f 72 6b 53 70 65 |.vRefNum|,workSpe|
|00000e50| 63 2e 70 61 72 49 44 2c | 77 6f 72 6b 53 70 65 63 |c.parID,|workSpec|
|00000e60| 2e 6e 61 6d 65 2c 66 73 | 52 64 57 72 50 65 72 6d |.name,fs|RdWrPerm|
|00000e70| 2c 26 72 65 66 4e 75 6d | 29 3b 0d 09 69 66 20 28 |,&refNum|);..if (|
|00000e80| 6f 65 20 21 3d 20 6e 6f | 45 72 72 29 20 7b 0d 09 |oe != no|Err) {..|
|00000e90| 09 4f 53 45 72 72 6f 72 | 41 6c 65 72 74 28 45 53 |.OSError|Alert(ES|
|00000ea0| 5f 43 61 75 74 69 6f 6e | 2c 20 22 48 4f 70 65 6e |_Caution|, "HOpen|
|00000eb0| 22 2c 20 6f 65 29 3b 0d | 09 09 72 65 74 75 72 6e |", oe);.|..return|
|00000ec0| 3b 0d 09 7d 0d 0d 09 64 | 57 69 6e 2d 3e 77 6f 72 |;..}...d|Win->wor|
|00000ed0| 6b 53 70 65 63 20 3d 20 | 77 6f 72 6b 53 70 65 63 |kSpec = |workSpec|
|00000ee0| 3b 0d 09 64 57 69 6e 2d | 3e 77 6f 72 6b 52 65 66 |;..dWin-|>workRef|
|00000ef0| 4e 75 6d 20 3d 20 72 65 | 66 4e 75 6d 3b 0d 09 64 |Num = re|fNum;..d|
|00000f00| 57 69 6e 2d 3e 77 6f 72 | 6b 42 79 74 65 73 57 72 |Win->wor|kBytesWr|
|00000f10| 69 74 74 65 6e 20 3d 20 | 30 4c 3b 0d 0d 09 64 57 |itten = |0L;...dW|
|00000f20| 69 6e 2d 3e 66 69 6c 65 | 54 79 70 65 20 3d 20 44 |in->file|Type = D|
|00000f30| 45 46 46 49 4c 45 54 59 | 50 45 3b 0d 09 64 57 69 |EFFILETY|PE;..dWi|
|00000f40| 6e 2d 3e 63 72 65 61 74 | 6f 72 20 3d 20 43 52 45 |n->creat|or = CRE|
|00000f50| 41 54 4f 52 3b 0d 09 64 | 57 69 6e 2d 3e 63 72 65 |ATOR;..d|Win->cre|
|00000f60| 61 74 69 6f 6e 44 61 74 | 65 20 3d 20 30 4c 3b 0d |ationDat|e = 0L;.|
|00000f70| 0d 09 74 68 65 57 69 6e | 64 6f 77 20 3d 20 49 6e |..theWin|dow = In|
|00000f80| 69 74 4f 62 6a 65 63 74 | 57 69 6e 64 6f 77 28 4d |itObject|Window(M|
|00000f90| 61 69 6e 57 49 4e 44 2c | 20 28 4f 62 6a 65 63 74 |ainWIND,| (Object|
|00000fa0| 57 69 6e 64 6f 77 50 74 | 72 29 20 64 57 69 6e 2c |WindowPt|r) dWin,|
|00000fb0| 66 61 6c 73 65 29 3b 0d | 09 69 66 20 28 74 68 65 |false);.|.if (the|
|00000fc0| 57 69 6e 64 6f 77 20 3d | 3d 20 4e 55 4c 4c 29 0d |Window =|= NULL).|
|00000fd0| 09 09 45 72 72 6f 72 41 | 6c 65 72 74 28 45 53 5f |..ErrorA|lert(ES_|
|00000fe0| 53 74 6f 70 2c 22 4e 6f | 74 20 65 6e 6f 75 67 68 |Stop,"No|t enough|
|00000ff0| 20 6d 65 6d 6f 72 79 22 | 29 3b 0d 0d 09 53 69 7a | memory"|);...Siz|
|00001000| 65 57 69 6e 64 6f 77 28 | 74 68 65 57 69 6e 64 6f |eWindow(|theWindo|
|00001010| 77 2c 34 38 34 2b 53 42 | 61 72 53 69 7a 65 2d 31 |w,484+SB|arSize-1|
|00001020| 2d 31 2c 67 4d 61 78 48 | 65 69 67 68 74 2d 36 34 |-1,gMaxH|eight-64|
|00001030| 2c 74 72 75 65 29 3b 0d | 09 53 65 74 52 65 63 74 |,true);.|.SetRect|
|00001040| 28 26 72 2c 20 30 2c 20 | 30 2c 20 4d 61 78 57 69 |(&r, 0, |0, MaxWi|
|00001050| 6e 64 6f 77 57 69 64 74 | 68 2b 53 42 61 72 53 69 |ndowWidt|h+SBarSi|
|00001060| 7a 65 2d 31 2c 20 67 4d | 61 78 48 65 69 67 68 74 |ze-1, gM|axHeight|
|00001070| 20 2d 20 34 34 29 3b 0d | 09 4f 66 66 73 65 74 52 | - 44);.|.OffsetR|
|00001080| 65 63 74 28 26 72 2c 33 | 2c 34 31 29 3b 0d 09 28 |ect(&r,3|,41);..(|
|00001090| 28 57 53 74 61 74 65 44 | 61 74 61 20 2a 29 2a 28 |(WStateD|ata *)*(|
|000010a0| 28 57 69 6e 64 6f 77 50 | 65 65 6b 29 20 74 68 65 |(WindowP|eek) the|
|000010b0| 57 69 6e 64 6f 77 29 2d | 3e 64 61 74 61 48 61 6e |Window)-|>dataHan|
|000010c0| 64 6c 65 29 2d 3e 73 74 | 64 53 74 61 74 65 20 3d |dle)->st|dState =|
|000010d0| 20 72 3b 0d 0d 09 53 65 | 74 57 54 69 74 6c 65 28 | r;...Se|tWTitle(|
|000010e0| 74 68 65 57 69 6e 64 6f | 77 2c 20 22 5c 70 55 6e |theWindo|w, "\pUn|
|000010f0| 74 69 74 6c 65 64 22 29 | 3b 0d 0d 09 28 28 4f 62 |titled")|;...((Ob|
|00001100| 6a 65 63 74 57 69 6e 64 | 6f 77 50 74 72 29 20 74 |jectWind|owPtr) t|
|00001110| 68 65 57 69 6e 64 6f 77 | 29 2d 3e 44 72 61 77 20 |heWindow|)->Draw |
|00001120| 3d 20 4d 79 44 72 61 77 | 3b 0d 09 28 28 4f 62 6a |= MyDraw|;..((Obj|
|00001130| 65 63 74 57 69 6e 64 6f | 77 50 74 72 29 20 74 68 |ectWindo|wPtr) th|
|00001140| 65 57 69 6e 64 6f 77 29 | 2d 3e 49 64 6c 65 20 3d |eWindow)|->Idle =|
|00001150| 20 4d 79 49 64 6c 65 3b | 0d 09 28 28 4f 62 6a 65 | MyIdle;|..((Obje|
|00001160| 63 74 57 69 6e 64 6f 77 | 50 74 72 29 20 74 68 65 |ctWindow|Ptr) the|
|00001170| 57 69 6e 64 6f 77 29 2d | 3e 48 61 6e 64 6c 65 43 |Window)-|>HandleC|
|00001180| 6c 69 63 6b 20 3d 20 4d | 79 48 61 6e 64 6c 65 43 |lick = M|yHandleC|
|00001190| 6c 69 63 6b 3b 0d 09 28 | 28 4f 62 6a 65 63 74 57 |lick;..(|(ObjectW|
|000011a0| 69 6e 64 6f 77 50 74 72 | 29 20 74 68 65 57 69 6e |indowPtr|) theWin|
|000011b0| 64 6f 77 29 2d 3e 44 69 | 73 70 6f 73 65 20 3d 20 |dow)->Di|spose = |
|000011c0| 44 69 73 70 6f 73 65 45 | 64 69 74 57 69 6e 64 6f |DisposeE|ditWindo|
|000011d0| 77 3b 0d 09 28 28 4f 62 | 6a 65 63 74 57 69 6e 64 |w;..((Ob|jectWind|
|000011e0| 6f 77 50 74 72 29 20 74 | 68 65 57 69 6e 64 6f 77 |owPtr) t|heWindow|
|000011f0| 29 2d 3e 50 72 6f 63 65 | 73 73 4b 65 79 20 3d 20 |)->Proce|ssKey = |
|00001200| 4d 79 50 72 6f 63 65 73 | 73 4b 65 79 3b 0d 09 28 |MyProces|sKey;..(|
|00001210| 28 4f 62 6a 65 63 74 57 | 69 6e 64 6f 77 50 74 72 |(ObjectW|indowPtr|
|00001220| 29 20 74 68 65 57 69 6e | 64 6f 77 29 2d 3e 53 61 |) theWin|dow)->Sa|
|00001230| 76 65 20 3d 20 53 61 76 | 65 43 6f 6e 74 65 6e 74 |ve = Sav|eContent|
|00001240| 73 3b 0d 09 28 28 4f 62 | 6a 65 63 74 57 69 6e 64 |s;..((Ob|jectWind|
|00001250| 6f 77 50 74 72 29 20 74 | 68 65 57 69 6e 64 6f 77 |owPtr) t|heWindow|
|00001260| 29 2d 3e 53 61 76 65 41 | 73 20 3d 20 53 61 76 65 |)->SaveA|s = Save|
|00001270| 41 73 43 6f 6e 74 65 6e | 74 73 3b 0d 09 28 28 4f |AsConten|ts;..((O|
|00001280| 62 6a 65 63 74 57 69 6e | 64 6f 77 50 74 72 29 20 |bjectWin|dowPtr) |
|00001290| 74 68 65 57 69 6e 64 6f | 77 29 2d 3e 52 65 76 65 |theWindo|w)->Reve|
|000012a0| 72 74 20 3d 20 52 65 76 | 65 72 74 43 6f 6e 74 65 |rt = Rev|ertConte|
|000012b0| 6e 74 73 3b 0d 09 0d 09 | 2f 2f 20 53 68 6f 77 20 |nts;....|// Show |
|000012c0| 74 68 65 20 77 69 6e 64 | 6f 77 0d 09 53 68 6f 77 |the wind|ow..Show|
|000012d0| 57 69 6e 64 6f 77 28 74 | 68 65 57 69 6e 64 6f 77 |Window(t|heWindow|
|000012e0| 29 3b 0d 0d 09 2f 2f 20 | 4d 61 6b 65 20 69 74 20 |);...// |Make it |
|000012f0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 67 72 61 66 |the curr|ent graf|
|00001300| 70 6f 72 74 0d 09 53 65 | 74 50 6f 72 74 28 74 68 |port..Se|tPort(th|
|00001310| 65 57 69 6e 64 6f 77 29 | 3b 0d 0d 09 0d 09 64 57 |eWindow)|;.....dW|
|00001320| 69 6e 2d 3e 6c 69 6e 65 | 73 50 65 72 50 61 67 65 |in->line|sPerPage|
|00001330| 20 3d 20 28 28 74 68 65 | 57 69 6e 64 6f 77 2d 3e | = ((the|Window->|
|00001340| 70 6f 72 74 52 65 63 74 | 2e 62 6f 74 74 6f 6d 20 |portRect|.bottom |
|00001350| 2d 20 53 42 61 72 53 69 | 7a 65 29 20 2d 20 54 6f |- SBarSi|ze) - To|
|00001360| 70 4d 61 72 67 69 6e 20 | 2d 20 42 6f 74 4d 61 72 |pMargin |- BotMar|
|00001370| 67 69 6e 20 2d 20 48 65 | 61 64 65 72 48 65 69 67 |gin - He|aderHeig|
|00001380| 68 74 29 2f 4c 69 6e 65 | 48 65 69 67 68 74 3b 0d |ht)/Line|Height;.|
|00001390| 09 64 57 69 6e 2d 3e 73 | 74 61 72 74 53 65 6c 20 |.dWin->s|tartSel |
|000013a0| 3d 20 64 57 69 6e 2d 3e | 65 6e 64 53 65 6c 20 3d |= dWin->|endSel =|
|000013b0| 20 30 4c 3b 0d 09 64 57 | 69 6e 2d 3e 65 64 69 74 | 0L;..dW|in->edit|
|000013c0| 4d 6f 64 65 20 3d 20 45 | 4d 5f 48 65 78 3b 0d 0d |Mode = E|M_Hex;..|
|000013d0| 09 53 65 74 75 70 53 63 | 72 6f 6c 6c 42 61 72 73 |.SetupSc|rollBars|
|000013e0| 28 64 57 69 6e 29 3b 0d | 0d 09 64 57 69 6e 2d 3e |(dWin);.|..dWin->|
|000013f0| 66 69 72 73 74 43 68 75 | 6e 6b 20 3d 20 4e 65 77 |firstChu|nk = New|
|00001400| 43 68 75 6e 6b 28 30 4c | 2c 30 4c 2c 30 4c 2c 20 |Chunk(0L|,0L,0L, |
|00001410| 43 54 5f 55 6e 77 72 69 | 74 74 65 6e 29 3b 0d 09 |CT_Unwri|tten);..|
|00001420| 64 57 69 6e 2d 3e 63 75 | 72 43 68 75 6e 6b 20 3d |dWin->cu|rChunk =|
|00001430| 20 64 57 69 6e 2d 3e 66 | 69 72 73 74 43 68 75 6e | dWin->f|irstChun|
|00001440| 6b 3b 0d 7d 0d 0d 23 64 | 65 66 69 6e 65 20 44 61 |k;.}..#d|efine Da|
|00001450| 74 61 49 74 65 6d 09 09 | 31 31 0d 23 64 65 66 69 |taItem..|11.#defi|
|00001460| 6e 65 20 52 73 72 63 49 | 74 65 6d 09 09 31 32 0d |ne RsrcI|tem..12.|
|00001470| 23 64 65 66 69 6e 65 20 | 53 6d 61 72 74 49 74 65 |#define |SmartIte|
|00001480| 6d 09 09 31 33 0d 0d 2f | 2a 53 46 52 65 70 6c 79 |m..13../|*SFReply|
|00001490| 09 09 2a 67 52 65 70 6c | 79 50 74 72 3b 2a 2f 0d |..*gRepl|yPtr;*/.|
|000014a0| 0d 70 61 73 63 61 6c 20 | 69 6e 74 20 53 6f 75 72 |.pascal |int Sour|
|000014b0| 63 65 44 4c 4f 47 48 6f | 6f 6b 28 73 68 6f 72 74 |ceDLOGHo|ok(short|
|000014c0| 20 69 74 65 6d 2c 20 44 | 69 61 6c 6f 67 50 74 72 | item, D|ialogPtr|
|000014d0| 20 74 68 65 44 69 61 6c | 6f 67 29 0d 7b 0d 09 73 | theDial|og).{..s|
|000014e0| 77 69 74 63 68 20 28 69 | 74 65 6d 29 20 7b 0d 09 |witch (i|tem) {..|
|000014f0| 63 61 73 65 20 44 61 74 | 61 49 74 65 6d 3a 0d 09 |case Dat|aItem:..|
|00001500| 63 61 73 65 20 52 73 72 | 63 49 74 65 6d 3a 0d 09 |case Rsr|cItem:..|
|00001510| 63 61 73 65 20 53 6d 61 | 72 74 49 74 65 6d 3a 0d |case Sma|rtItem:.|
|00001520| 09 09 53 65 74 43 6f 6e | 74 72 6f 6c 28 74 68 65 |..SetCon|trol(the|
|00001530| 44 69 61 6c 6f 67 2c 67 | 46 6f 72 6b 4d 6f 64 65 |Dialog,g|ForkMode|
|00001540| 2b 44 61 74 61 49 74 65 | 6d 2c 66 61 6c 73 65 29 |+DataIte|m,false)|
|00001550| 3b 0d 09 09 67 46 6f 72 | 6b 4d 6f 64 65 20 3d 20 |;...gFor|kMode = |
|00001560| 69 74 65 6d 20 2d 20 44 | 61 74 61 49 74 65 6d 3b |item - D|ataItem;|
|00001570| 0d 09 09 53 65 74 43 6f | 6e 74 72 6f 6c 28 74 68 |...SetCo|ntrol(th|
|00001580| 65 44 69 61 6c 6f 67 2c | 67 46 6f 72 6b 4d 6f 64 |eDialog,|gForkMod|
|00001590| 65 2b 44 61 74 61 49 74 | 65 6d 2c 74 72 75 65 29 |e+DataIt|em,true)|
|000015a0| 3b 0d 09 09 72 65 74 75 | 72 6e 20 73 66 48 6f 6f |;...retu|rn sfHoo|
|000015b0| 6b 4e 75 6c 6c 45 76 65 | 6e 74 3b 09 2f 2a 20 52 |kNullEve|nt;./* R|
|000015c0| 65 64 72 61 77 20 74 68 | 65 20 4c 69 73 74 20 2a |edraw th|e List *|
|000015d0| 2f 0d 09 63 61 73 65 20 | 73 66 48 6f 6f 6b 46 69 |/..case |sfHookFi|
|000015e0| 72 73 74 43 61 6c 6c 3a | 0d 09 09 53 65 74 43 6f |rstCall:|...SetCo|
|000015f0| 6e 74 72 6f 6c 28 74 68 | 65 44 69 61 6c 6f 67 2c |ntrol(th|eDialog,|
|00001600| 67 46 6f 72 6b 4d 6f 64 | 65 2b 44 61 74 61 49 74 |gForkMod|e+DataIt|
|00001610| 65 6d 2c 74 72 75 65 29 | 3b 0d 09 09 72 65 74 75 |em,true)|;...retu|
|00001620| 72 6e 20 73 66 48 6f 6f | 6b 4e 75 6c 6c 45 76 65 |rn sfHoo|kNullEve|
|00001630| 6e 74 3b 0d 2f 2a 09 63 | 61 73 65 20 73 66 48 6f |nt;./*.c|ase sfHo|
|00001640| 6f 6b 4e 75 6c 6c 45 76 | 65 6e 74 3a 2a 2f 0d 2f |okNullEv|ent:*/./|
|00001650| 2a 09 09 7b 2a 2f 0d 2f | 2a 09 09 09 50 6f 69 6e |*..{*/./|*...Poin|
|00001660| 74 09 70 3b 2a 2f 0d 2f | 2a 09 09 09 73 68 6f 72 |t.p;*/./|*...shor|
|00001670| 74 09 74 3b 2a 2f 0d 2f | 2a 09 09 09 48 61 6e 64 |t.t;*/./|*...Hand|
|00001680| 6c 65 09 68 3b 2a 2f 0d | 2f 2a 09 09 09 52 65 63 |le.h;*/.|/*...Rec|
|00001690| 74 09 72 3b 2a 2f 0d 2f | 2a 09 09 09 47 65 74 4d |t.r;*/./|*...GetM|
|000016a0| 6f 75 73 65 28 26 70 29 | 3b 2a 2f 0d 2f 2a 09 09 |ouse(&p)|;*/./*..|
|000016b0| 09 47 65 74 44 49 74 65 | 6d 28 74 68 65 44 69 61 |.GetDIte|m(theDia|
|000016c0| 6c 6f 67 2c 44 61 74 61 | 49 74 65 6d 2c 26 74 2c |log,Data|Item,&t,|
|000016d0| 26 68 2c 26 72 29 3b 09 | 09 09 2a 2f 0d 2f 2a 09 |&h,&r);.|..*/./*.|
|000016e0| 09 09 69 66 20 28 50 74 | 49 6e 52 65 63 74 28 70 |..if (Pt|InRect(p|
|000016f0| 2c 26 72 29 29 2a 2f 0d | 2f 2a 09 09 09 09 44 65 |,&r))*/.|/*....De|
|00001700| 62 75 67 53 74 72 28 22 | 5c 70 42 6f 69 6e 67 21 |bugStr("|\pBoing!|
|00001710| 22 29 3b 2a 2f 0d 2f 2a | 09 09 7d 2a 2f 0d 2f 2a |");*/./*|..}*/./*|
|00001720| 09 09 62 72 65 61 6b 3b | 2a 2f 0d 09 7d 0d 09 72 |..break;|*/..}..r|
|00001730| 65 74 75 72 6e 20 69 74 | 65 6d 3b 0d 7d 0d 0d 76 |eturn it|em;.}..v|
|00001740| 6f 69 64 20 41 73 6b 45 | 64 69 74 57 69 6e 64 6f |oid AskE|ditWindo|
|00001750| 77 28 76 6f 69 64 29 0d | 7b 0d 09 53 46 52 65 70 |w(void).|{..SFRep|
|00001760| 6c 79 09 09 09 09 6d 61 | 63 53 46 52 65 70 6c 79 |ly....ma|cSFReply|
|00001770| 3b 0d 09 46 53 53 70 65 | 63 09 09 09 09 66 53 70 |;..FSSpe|c....fSp|
|00001780| 65 63 3b 0d 09 6c 6f 6e | 67 09 09 09 09 70 72 6f |ec;..lon|g....pro|
|00001790| 63 49 44 3b 0d 09 50 6f | 69 6e 74 09 09 09 09 77 |cID;..Po|int....w|
|000017a0| 68 65 72 65 20 3d 20 7b | 2d 31 2c 2d 31 7d 3b 0d |here = {|-1,-1};.|
|000017b0| 0d 09 2f 2f 20 53 74 61 | 6e 64 61 72 64 47 65 74 |..// Sta|ndardGet|
|000017c0| 46 69 6c 65 28 4e 55 4c | 4c 2c 20 2d 31 2c 20 4e |File(NUL|L, -1, N|
|000017d0| 55 4c 4c 2c 20 26 72 65 | 70 6c 79 29 3b 0d 09 69 |ULL, &re|ply);..i|
|000017e0| 66 20 28 21 67 53 79 73 | 37 46 6c 61 67 29 20 7b |f (!gSys|7Flag) {|
|000017f0| 0d 09 09 77 68 65 72 65 | 2e 68 20 3d 20 32 30 3b |...where|.h = 20;|
|00001800| 0d 09 09 77 68 65 72 65 | 2e 76 20 3d 20 39 30 3b |...where|.v = 90;|
|00001810| 0d 09 7d 0d 0d 09 53 46 | 50 47 65 74 46 69 6c 65 |..}...SF|PGetFile|
|00001820| 28 77 68 65 72 65 2c 20 | 22 5c 70 46 69 6c 65 20 |(where, |"\pFile |
|00001830| 74 6f 20 4f 70 65 6e 3a | 22 2c 20 4e 55 4c 4c 2c |to Open:|", NULL,|
|00001840| 20 2d 31 2c 20 4e 55 4c | 4c 2c 20 28 50 72 6f 63 | -1, NUL|L, (Proc|
|00001850| 50 74 72 29 20 53 6f 75 | 72 63 65 44 4c 4f 47 48 |Ptr) Sou|rceDLOGH|
|00001860| 6f 6f 6b 2c 20 0d 09 09 | 09 09 26 6d 61 63 53 46 |ook, ...|..&macSF|
|00001870| 52 65 70 6c 79 2c 20 47 | 65 74 46 69 6c 65 44 4c |Reply, G|etFileDL|
|00001880| 4f 47 2c 20 4e 55 4c 4c | 29 3b 0d 0d 09 69 66 20 |OG, NULL|);...if |
|00001890| 28 6d 61 63 53 46 52 65 | 70 6c 79 2e 67 6f 6f 64 |(macSFRe|ply.good|
|000018a0| 29 20 7b 0d 09 09 42 6c | 6f 63 6b 4d 6f 76 65 28 |) {...Bl|ockMove(|
|000018b0| 6d 61 63 53 46 52 65 70 | 6c 79 2e 66 4e 61 6d 65 |macSFRep|ly.fName|
|000018c0| 2c 66 53 70 65 63 2e 6e | 61 6d 65 2c 6d 61 63 53 |,fSpec.n|ame,macS|
|000018d0| 46 52 65 70 6c 79 2e 66 | 4e 61 6d 65 5b 30 5d 2b |FReply.f|Name[0]+|
|000018e0| 31 29 3b 0d 09 09 47 65 | 74 57 44 49 6e 66 6f 28 |1);...Ge|tWDInfo(|
|000018f0| 6d 61 63 53 46 52 65 70 | 6c 79 2e 76 52 65 66 4e |macSFRep|ly.vRefN|
|00001900| 75 6d 2c 20 26 66 53 70 | 65 63 2e 76 52 65 66 4e |um, &fSp|ec.vRefN|
|00001910| 75 6d 2c 20 26 66 53 70 | 65 63 2e 70 61 72 49 44 |um, &fSp|ec.parID|
|00001920| 2c 20 26 70 72 6f 63 49 | 44 29 3b 0d 09 09 4f 70 |, &procI|D);...Op|
|00001930| 65 6e 45 64 69 74 57 69 | 6e 64 6f 77 28 26 66 53 |enEditWi|ndow(&fS|
|00001940| 70 65 63 29 3b 0d 09 7d | 0d 09 4d 79 41 64 6a 75 |pec);..}|..MyAdju|
|00001950| 73 74 4d 65 6e 75 73 28 | 29 3b 0d 7d 0d 0d 0d 0d |stMenus(|);.}....|
|00001960| 0d 76 6f 69 64 20 4f 70 | 65 6e 45 64 69 74 57 69 |.void Op|enEditWi|
|00001970| 6e 64 6f 77 28 46 53 53 | 70 65 63 20 2a 66 73 53 |ndow(FSS|pec *fsS|
|00001980| 70 65 63 29 0d 7b 0d 09 | 57 69 6e 64 6f 77 50 74 |pec).{..|WindowPt|
|00001990| 72 09 09 09 74 68 65 57 | 69 6e 64 6f 77 3b 0d 09 |r...theW|indow;..|
|000019a0| 45 64 69 74 57 69 6e 64 | 6f 77 50 74 72 09 09 64 |EditWind|owPtr..d|
|000019b0| 57 69 6e 3b 0d 09 4f 53 | 45 72 72 09 09 09 09 6f |Win;..OS|Err....o|
|000019c0| 65 3b 0d 09 73 68 6f 72 | 74 09 09 09 09 72 65 66 |e;..shor|t....ref|
|000019d0| 4e 75 6d 3d 30 3b 0d 09 | 50 6f 69 6e 74 09 09 09 |Num=0;..|Point...|
|000019e0| 09 77 68 65 72 65 3d 7b | 2d 31 2c 2d 31 7d 3b 0d |.where={|-1,-1};.|
|000019f0| 09 48 50 61 72 61 6d 42 | 6c 6f 63 6b 52 65 63 09 |.HParamB|lockRec.|
|00001a00| 09 70 62 3b 0d 09 46 53 | 53 70 65 63 09 09 09 09 |.pb;..FS|Spec....|
|00001a10| 77 6f 72 6b 53 70 65 63 | 3b 0d 09 52 65 63 74 09 |workSpec|;..Rect.|
|00001a20| 09 09 09 72 3b 0d 0d 09 | 2f 2f 20 47 65 74 20 74 |...r;...|// Get t|
|00001a30| 68 65 20 54 65 6d 70 6c | 61 74 65 20 26 20 43 72 |he Templ|ate & Cr|
|00001a40| 65 61 74 65 20 74 68 65 | 20 57 69 6e 64 6f 77 2c |eate the| Window,|
|00001a50| 20 69 74 20 69 73 20 73 | 65 74 20 75 70 20 69 6e | it is s|et up in|
|00001a60| 20 74 68 65 20 72 65 73 | 6f 75 72 63 65 20 66 6f | the res|ource fo|
|00001a70| 72 6b 0d 09 2f 2f 20 74 | 6f 20 6e 6f 74 20 62 65 |rk..// t|o not be|
|00001a80| 20 69 6e 69 74 69 61 6c | 6c 79 20 76 69 73 69 62 | initial|ly visib|
|00001a90| 6c 65 20 0d 0d 0d 09 70 | 62 2e 66 69 6c 65 50 61 |le ....p|b.filePa|
|00001aa0| 72 61 6d 2e 69 6f 43 6f | 6d 70 6c 65 74 69 6f 6e |ram.ioCo|mpletion|
|00001ab0| 20 3d 20 30 6c 3b 0d 09 | 70 62 2e 66 69 6c 65 50 | = 0l;..|pb.fileP|
|00001ac0| 61 72 61 6d 2e 69 6f 4e | 61 6d 65 50 74 72 20 3d |aram.ioN|amePtr =|
|00001ad0| 20 66 73 53 70 65 63 2d | 3e 6e 61 6d 65 3b 0d 09 | fsSpec-|>name;..|
|00001ae0| 70 62 2e 66 69 6c 65 50 | 61 72 61 6d 2e 69 6f 56 |pb.fileP|aram.ioV|
|00001af0| 52 65 66 4e 75 6d 20 3d | 20 66 73 53 70 65 63 2d |RefNum =| fsSpec-|
|00001b00| 3e 76 52 65 66 4e 75 6d | 3b 0d 09 70 62 2e 66 69 |>vRefNum|;..pb.fi|
|00001b10| 6c 65 50 61 72 61 6d 2e | 69 6f 44 69 72 49 44 20 |leParam.|ioDirID |
|00001b20| 3d 20 66 73 53 70 65 63 | 2d 3e 70 61 72 49 44 3b |= fsSpec|->parID;|
|00001b30| 0d 09 70 62 2e 66 69 6c | 65 50 61 72 61 6d 2e 69 |..pb.fil|eParam.i|
|00001b40| 6f 46 44 69 72 49 6e 64 | 65 78 20 3d 20 30 3b 0d |oFDirInd|ex = 0;.|
|00001b50| 0d 09 69 66 20 28 28 6f | 65 20 3d 20 50 42 48 47 |..if ((o|e = PBHG|
|00001b60| 65 74 46 49 6e 66 6f 28 | 26 70 62 2c 46 41 4c 53 |etFInfo(|&pb,FALS|
|00001b70| 45 29 29 20 21 3d 20 6e | 6f 45 72 72 29 20 7b 0d |E)) != n|oErr) {.|
|00001b80| 09 09 4f 53 45 72 72 6f | 72 41 6c 65 72 74 28 45 |..OSErro|rAlert(E|
|00001b90| 53 5f 43 61 75 74 69 6f | 6e 2c 20 22 50 42 48 47 |S_Cautio|n, "PBHG|
|00001ba0| 65 74 46 49 6e 66 6f 22 | 2c 20 6f 65 29 3b 0d 09 |etFInfo"|, oe);..|
|00001bb0| 09 72 65 74 75 72 6e 3b | 0d 09 7d 0d 0d 09 2f 2f |.return;|..}...//|
|00001bc0| 20 66 69 6c 65 53 69 7a | 65 20 3d 20 70 62 2e 66 | fileSiz|e = pb.f|
|00001bd0| 69 6c 65 50 61 72 61 6d | 2e 69 6f 46 6c 4c 67 4c |ileParam|.ioFlLgL|
|00001be0| 65 6e 3b 09 2f 2f 20 44 | 61 74 61 20 46 6f 72 6b |en;.// D|ata Fork|
|00001bf0| 20 4c 65 6e 67 74 68 21 | 21 21 21 0d 09 2f 2f 20 | Length!|!!!..// |
|00001c00| 47 65 74 45 4f 46 28 72 | 65 66 4e 75 6d 2c 26 66 |GetEOF(r|efNum,&f|
|00001c10| 69 6c 65 53 69 7a 65 29 | 3b 0d 0d 09 64 57 69 6e |ileSize)|;...dWin|
|00001c20| 20 3d 20 28 45 64 69 74 | 57 69 6e 64 6f 77 50 74 | = (Edit|WindowPt|
|00001c30| 72 29 20 4e 65 77 50 74 | 72 43 6c 65 61 72 28 73 |r) NewPt|rClear(s|
|00001c40| 69 7a 65 6f 66 28 45 64 | 69 74 57 69 6e 64 6f 77 |izeof(Ed|itWindow|
|00001c50| 52 65 63 6f 72 64 29 29 | 3b 0d 09 69 66 20 28 64 |Record))|;..if (d|
|00001c60| 57 69 6e 20 3d 3d 20 4e | 55 4c 4c 29 20 7b 0d 09 |Win == N|ULL) {..|
|00001c70| 09 46 53 43 6c 6f 73 65 | 28 72 65 66 4e 75 6d 29 |.FSClose|(refNum)|
|00001c80| 3b 0d 09 09 45 72 72 6f | 72 41 6c 65 72 74 28 45 |;...Erro|rAlert(E|
|00001c90| 53 5f 43 61 75 74 69 6f | 6e 2c 20 22 43 61 6e 27 |S_Cautio|n, "Can'|
|00001ca0| 74 20 61 6c 6c 6f 63 61 | 74 65 20 6e 65 77 20 77 |t alloca|te new w|
|00001cb0| 69 6e 64 6f 77 22 29 3b | 0d 09 09 72 65 74 75 72 |indow");|...retur|
|00001cc0| 6e 3b 0d 09 7d 0d 0d 09 | 69 66 20 28 67 46 6f 72 |n;..}...|if (gFor|
|00001cd0| 6b 4d 6f 64 65 20 3d 3d | 20 46 4d 5f 44 61 74 61 |kMode ==| FM_Data|
|00001ce0| 20 7c 7c 20 28 70 62 2e | 66 69 6c 65 50 61 72 61 | || (pb.|filePara|
|00001cf0| 6d 2e 69 6f 46 6c 4c 67 | 4c 65 6e 20 3e 20 30 20 |m.ioFlLg|Len > 0 |
|00001d00| 26 26 20 67 46 6f 72 6b | 4d 6f 64 65 20 3d 3d 20 |&& gFork|Mode == |
|00001d10| 46 4d 5f 53 6d 61 72 74 | 29 29 20 7b 0d 09 09 2f |FM_Smart|)) {.../|
|00001d20| 2f 20 4f 70 65 6e 20 44 | 61 74 61 20 46 6f 72 6b |/ Open D|ata Fork|
|00001d30| 0d 09 09 64 57 69 6e 2d | 3e 66 6f 72 6b 20 3d 20 |...dWin-|>fork = |
|00001d40| 46 54 5f 44 61 74 61 3b | 0d 09 09 6f 65 20 3d 20 |FT_Data;|...oe = |
|00001d50| 48 4f 70 65 6e 28 66 73 | 53 70 65 63 2d 3e 76 52 |HOpen(fs|Spec->vR|
|00001d60| 65 66 4e 75 6d 2c 66 73 | 53 70 65 63 2d 3e 70 61 |efNum,fs|Spec->pa|
|00001d70| 72 49 44 2c 66 73 53 70 | 65 63 2d 3e 6e 61 6d 65 |rID,fsSp|ec->name|
|00001d80| 2c 66 73 52 64 50 65 72 | 6d 2c 26 72 65 66 4e 75 |,fsRdPer|m,&refNu|
|00001d90| 6d 29 3b 0d 09 09 69 66 | 20 28 6f 65 20 3d 3d 20 |m);...if| (oe == |
|00001da0| 66 6e 66 45 72 72 29 20 | 7b 0d 09 09 09 50 61 72 |fnfErr) |{....Par|
|00001db0| 61 6d 54 65 78 74 28 66 | 73 53 70 65 63 2d 3e 6e |amText(f|sSpec->n|
|00001dc0| 61 6d 65 2c 22 5c 70 64 | 61 74 61 22 2c 22 5c 70 |ame,"\pd|ata","\p|
|00001dd0| 22 2c 22 5c 70 22 29 3b | 0d 09 09 09 69 66 20 28 |","\p");|....if (|
|00001de0| 43 61 75 74 69 6f 6e 41 | 6c 65 72 74 28 4e 6f 46 |CautionA|lert(NoF|
|00001df0| 6f 72 6b 41 4c 52 54 2c | 4e 55 4c 4c 29 20 21 3d |orkALRT,|NULL) !=|
|00001e00| 20 32 29 0d 09 09 09 09 | 72 65 74 75 72 6e 3b 0d | 2).....|return;.|
|00001e10| 09 09 09 6f 65 20 3d 20 | 48 43 72 65 61 74 65 28 |...oe = |HCreate(|
|00001e20| 66 73 53 70 65 63 2d 3e | 76 52 65 66 4e 75 6d 2c |fsSpec->|vRefNum,|
|00001e30| 66 73 53 70 65 63 2d 3e | 70 61 72 49 44 2c 66 73 |fsSpec->|parID,fs|
|00001e40| 53 70 65 63 2d 3e 6e 61 | 6d 65 2c 0d 09 09 09 09 |Spec->na|me,.....|
|00001e50| 09 09 70 62 2e 66 69 6c | 65 50 61 72 61 6d 2e 69 |..pb.fil|eParam.i|
|00001e60| 6f 46 6c 46 6e 64 72 49 | 6e 66 6f 2e 66 64 43 72 |oFlFndrI|nfo.fdCr|
|00001e70| 65 61 74 6f 72 2c 0d 09 | 09 09 09 09 09 70 62 2e |eator,..|.....pb.|
|00001e80| 66 69 6c 65 50 61 72 61 | 6d 2e 69 6f 46 6c 46 6e |filePara|m.ioFlFn|
|00001e90| 64 72 49 6e 66 6f 2e 66 | 64 54 79 70 65 29 3b 0d |drInfo.f|dType);.|
|00001ea0| 09 09 09 69 66 20 28 6f | 65 20 21 3d 20 6e 6f 45 |...if (o|e != noE|
|00001eb0| 72 72 29 20 7b 0d 09 09 | 09 09 4f 53 45 72 72 6f |rr) {...|..OSErro|
|00001ec0| 72 41 6c 65 72 74 28 45 | 53 5f 43 61 75 74 69 6f |rAlert(E|S_Cautio|
|00001ed0| 6e 2c 20 22 48 43 72 65 | 61 74 65 22 2c 20 6f 65 |n, "HCre|ate", oe|
|00001ee0| 29 3b 0d 09 09 09 09 72 | 65 74 75 72 6e 3b 0d 09 |);.....r|eturn;..|
|00001ef0| 09 09 7d 0d 09 09 09 6f | 65 20 3d 20 48 4f 70 65 |..}....o|e = HOpe|
|00001f00| 6e 28 66 73 53 70 65 63 | 2d 3e 76 52 65 66 4e 75 |n(fsSpec|->vRefNu|
|00001f10| 6d 2c 66 73 53 70 65 63 | 2d 3e 70 61 72 49 44 2c |m,fsSpec|->parID,|
|00001f20| 66 73 53 70 65 63 2d 3e | 6e 61 6d 65 2c 66 73 52 |fsSpec->|name,fsR|
|00001f30| 64 50 65 72 6d 2c 26 72 | 65 66 4e 75 6d 29 3b 0d |dPerm,&r|efNum);.|
|00001f40| 09 09 7d 0d 09 09 69 66 | 20 28 6f 65 20 21 3d 20 |..}...if| (oe != |
|00001f50| 6e 6f 45 72 72 29 20 7b | 0d 09 09 09 4f 53 45 72 |noErr) {|....OSEr|
|00001f60| 72 6f 72 41 6c 65 72 74 | 28 45 53 5f 43 61 75 74 |rorAlert|(ES_Caut|
|00001f70| 69 6f 6e 2c 20 22 48 4f | 70 65 6e 22 2c 20 6f 65 |ion, "HO|pen", oe|
|00001f80| 29 3b 0d 09 09 09 72 65 | 74 75 72 6e 3b 0d 09 09 |);....re|turn;...|
|00001f90| 7d 0d 09 09 64 57 69 6e | 2d 3e 66 69 6c 65 53 69 |}...dWin|->fileSi|
|00001fa0| 7a 65 20 3d 20 70 62 2e | 66 69 6c 65 50 61 72 61 |ze = pb.|filePara|
|00001fb0| 6d 2e 69 6f 46 6c 4c 67 | 4c 65 6e 3b 0d 09 7d 0d |m.ioFlLg|Len;..}.|
|00001fc0| 09 65 6c 73 65 20 7b 0d | 09 09 2f 2f 20 4f 70 65 |.else {.|..// Ope|
|00001fd0| 6e 20 52 65 73 6f 75 72 | 63 65 20 46 6f 72 6b 0d |n Resour|ce Fork.|
|00001fe0| 09 09 64 57 69 6e 2d 3e | 66 6f 72 6b 20 3d 20 46 |..dWin->|fork = F|
|00001ff0| 54 5f 52 65 73 6f 75 72 | 63 65 3b 0d 09 09 6f 65 |T_Resour|ce;...oe|
|00002000| 20 3d 20 48 4f 70 65 6e | 52 46 28 66 73 53 70 65 | = HOpen|RF(fsSpe|
|00002010| 63 2d 3e 76 52 65 66 4e | 75 6d 2c 66 73 53 70 65 |c->vRefN|um,fsSpe|
|00002020| 63 2d 3e 70 61 72 49 44 | 2c 66 73 53 70 65 63 2d |c->parID|,fsSpec-|
|00002030| 3e 6e 61 6d 65 2c 66 73 | 52 64 50 65 72 6d 2c 26 |>name,fs|RdPerm,&|
|00002040| 72 65 66 4e 75 6d 29 3b | 0d 09 09 69 66 20 28 6f |refNum);|...if (o|
|00002050| 65 20 3d 3d 20 66 6e 66 | 45 72 72 29 20 7b 0d 09 |e == fnf|Err) {..|
|00002060| 09 09 50 61 72 61 6d 54 | 65 78 74 28 66 73 53 70 |..ParamT|ext(fsSp|
|00002070| 65 63 2d 3e 6e 61 6d 65 | 2c 22 5c 70 72 65 73 6f |ec->name|,"\preso|
|00002080| 75 72 63 65 22 2c 22 5c | 70 22 2c 22 5c 70 22 29 |urce","\|p","\p")|
|00002090| 3b 0d 09 09 09 69 66 20 | 28 43 61 75 74 69 6f 6e |;....if |(Caution|
|000020a0| 41 6c 65 72 74 28 4e 6f | 46 6f 72 6b 41 4c 52 54 |Alert(No|ForkALRT|
|000020b0| 2c 4e 55 4c 4c 29 20 21 | 3d 20 32 29 0d 09 09 09 |,NULL) !|= 2)....|
|000020c0| 09 72 65 74 75 72 6e 3b | 0d 09 09 09 48 43 72 65 |.return;|....HCre|
|000020d0| 61 74 65 52 65 73 46 69 | 6c 65 28 66 73 53 70 65 |ateResFi|le(fsSpe|
|000020e0| 63 2d 3e 76 52 65 66 4e | 75 6d 2c 66 73 53 70 65 |c->vRefN|um,fsSpe|
|000020f0| 63 2d 3e 70 61 72 49 44 | 2c 66 73 53 70 65 63 2d |c->parID|,fsSpec-|
|00002100| 3e 6e 61 6d 65 29 3b 0d | 09 09 09 69 66 20 28 28 |>name);.|...if ((|
|00002110| 6f 65 20 3d 20 52 65 73 | 45 72 72 6f 72 28 29 29 |oe = Res|Error())|
|00002120| 20 21 3d 20 6e 6f 45 72 | 72 29 20 7b 0d 09 09 09 | != noEr|r) {....|
|00002130| 09 4f 53 45 72 72 6f 72 | 41 6c 65 72 74 28 45 53 |.OSError|Alert(ES|
|00002140| 5f 43 61 75 74 69 6f 6e | 2c 20 22 48 43 72 65 61 |_Caution|, "HCrea|
|00002150| 74 65 52 65 73 46 69 6c | 65 22 2c 20 6f 65 29 3b |teResFil|e", oe);|
|00002160| 0d 09 09 09 09 72 65 74 | 75 72 6e 3b 0d 09 09 09 |.....ret|urn;....|
|00002170| 7d 0d 09 09 09 6f 65 20 | 3d 20 48 4f 70 65 6e 52 |}....oe |= HOpenR|
|00002180| 46 28 66 73 53 70 65 63 | 2d 3e 76 52 65 66 4e 75 |F(fsSpec|->vRefNu|
|00002190| 6d 2c 66 73 53 70 65 63 | 2d 3e 70 61 72 49 44 2c |m,fsSpec|->parID,|
|000021a0| 66 73 53 70 65 63 2d 3e | 6e 61 6d 65 2c 66 73 52 |fsSpec->|name,fsR|
|000021b0| 64 50 65 72 6d 2c 26 72 | 65 66 4e 75 6d 29 3b 0d |dPerm,&r|efNum);.|
|000021c0| 09 09 7d 0d 09 09 69 66 | 20 28 6f 65 20 21 3d 20 |..}...if| (oe != |
|000021d0| 6e 6f 45 72 72 29 20 7b | 0d 09 09 09 4f 53 45 72 |noErr) {|....OSEr|
|000021e0| 72 6f 72 41 6c 65 72 74 | 28 45 53 5f 43 61 75 74 |rorAlert|(ES_Caut|
|000021f0| 69 6f 6e 2c 20 22 48 4f | 70 65 6e 52 46 22 2c 20 |ion, "HO|penRF", |
|00002200| 6f 65 29 3b 0d 09 09 09 | 72 65 74 75 72 6e 3b 0d |oe);....|return;.|
|00002210| 09 09 7d 0d 09 09 64 57 | 69 6e 2d 3e 66 69 6c 65 |..}...dW|in->file|
|00002220| 53 69 7a 65 20 3d 20 70 | 62 2e 66 69 6c 65 50 61 |Size = p|b.filePa|
|00002230| 72 61 6d 2e 69 6f 46 6c | 52 4c 67 4c 65 6e 3b 0d |ram.ioFl|RLgLen;.|
|00002240| 09 7d 0d 0d 09 64 57 69 | 6e 2d 3e 72 65 66 4e 75 |.}...dWi|n->refNu|
|00002250| 6d 20 3d 20 72 65 66 4e | 75 6d 3b 0d 0d 09 77 6f |m = refN|um;...wo|
|00002260| 72 6b 53 70 65 63 20 3d | 20 2a 66 73 53 70 65 63 |rkSpec =| *fsSpec|
|00002270| 3b 0d 09 6f 65 20 3d 20 | 46 69 6e 64 46 6f 6c 64 |;..oe = |FindFold|
|00002280| 65 72 28 2d 31 2c 20 6b | 54 65 6d 70 6f 72 61 72 |er(-1, k|Temporar|
|00002290| 79 46 6f 6c 64 65 72 54 | 79 70 65 2c 20 6b 43 72 |yFolderT|ype, kCr|
|000022a0| 65 61 74 65 46 6f 6c 64 | 65 72 2c 20 0d 09 09 09 |eateFold|er, ....|
|000022b0| 09 09 26 77 6f 72 6b 53 | 70 65 63 2e 76 52 65 66 |..&workS|pec.vRef|
|000022c0| 4e 75 6d 2c 0d 09 09 09 | 09 09 26 77 6f 72 6b 53 |Num,....|..&workS|
|000022d0| 70 65 63 2e 70 61 72 49 | 44 29 3b 0d 09 69 66 20 |pec.parI|D);..if |
|000022e0| 28 6f 65 20 21 3d 20 6e | 6f 45 72 72 29 20 7b 0d |(oe != n|oErr) {.|
|000022f0| 09 09 4f 53 45 72 72 6f | 72 41 6c 65 72 74 28 45 |..OSErro|rAlert(E|
|00002300| 53 5f 43 61 75 74 69 6f | 6e 2c 20 22 46 69 6e 64 |S_Cautio|n, "Find|
|00002310| 46 6f 6c 64 65 72 22 2c | 20 6f 65 29 3b 0d 09 09 |Folder",| oe);...|
|00002320| 72 65 74 75 72 6e 3b 0d | 09 7d 0d 09 69 66 20 28 |return;.|.}..if (|
|00002330| 77 6f 72 6b 53 70 65 63 | 2e 6e 61 6d 65 5b 30 5d |workSpec|.name[0]|
|00002340| 20 3c 20 33 31 29 20 7b | 0d 09 09 77 6f 72 6b 53 | < 31) {|...workS|
|00002350| 70 65 63 2e 6e 61 6d 65 | 5b 30 5d 2b 2b 3b 0d 09 |pec.name|[0]++;..|
|00002360| 09 77 6f 72 6b 53 70 65 | 63 2e 6e 61 6d 65 5b 77 |.workSpe|c.name[w|
|00002370| 6f 72 6b 53 70 65 63 2e | 6e 61 6d 65 5b 30 5d 5d |orkSpec.|name[0]]|
|00002380| 20 3d 20 27 77 27 3b 0d | 09 7d 0d 09 65 6c 73 65 | = 'w';.|.}..else|
|00002390| 0d 09 09 77 6f 72 6b 53 | 70 65 63 2e 6e 61 6d 65 |...workS|pec.name|
|000023a0| 5b 33 31 5d 20 5e 3d 20 | 30 78 31 30 3b 0d 09 49 |[31] ^= |0x10;..I|
|000023b0| 6e 73 75 72 65 4e 61 6d | 65 49 73 55 6e 69 71 75 |nsureNam|eIsUniqu|
|000023c0| 65 28 26 77 6f 72 6b 53 | 70 65 63 29 3b 0d 09 6f |e(&workS|pec);..o|
|000023d0| 65 20 3d 20 48 43 72 65 | 61 74 65 28 77 6f 72 6b |e = HCre|ate(work|
|000023e0| 53 70 65 63 2e 76 52 65 | 66 4e 75 6d 2c 77 6f 72 |Spec.vRe|fNum,wor|
|000023f0| 6b 53 70 65 63 2e 70 61 | 72 49 44 2c 77 6f 72 6b |kSpec.pa|rID,work|
|00002400| 53 70 65 63 2e 6e 61 6d | 65 2c 43 52 45 41 54 4f |Spec.nam|e,CREATO|
|00002410| 52 2c 20 27 3f 3f 3f 3f | 27 29 3b 0d 09 69 66 20 |R, '????|');..if |
|00002420| 28 6f 65 20 21 3d 20 6e | 6f 45 72 72 29 20 7b 0d |(oe != n|oErr) {.|
|00002430| 09 09 4f 53 45 72 72 6f | 72 41 6c 65 72 74 28 45 |..OSErro|rAlert(E|
|00002440| 53 5f 43 61 75 74 69 6f | 6e 2c 20 22 48 43 72 65 |S_Cautio|n, "HCre|
|00002450| 61 74 65 22 2c 20 6f 65 | 29 3b 0d 09 09 72 65 74 |ate", oe|);...ret|
|00002460| 75 72 6e 3b 0d 09 7d 0d | 09 6f 65 20 3d 20 48 4f |urn;..}.|.oe = HO|
|00002470| 70 65 6e 28 77 6f 72 6b | 53 70 65 63 2e 76 52 65 |pen(work|Spec.vRe|
|00002480| 66 4e 75 6d 2c 77 6f 72 | 6b 53 70 65 63 2e 70 61 |fNum,wor|kSpec.pa|
|00002490| 72 49 44 2c 77 6f 72 6b | 53 70 65 63 2e 6e 61 6d |rID,work|Spec.nam|
|000024a0| 65 2c 66 73 52 64 57 72 | 50 65 72 6d 2c 26 72 65 |e,fsRdWr|Perm,&re|
|000024b0| 66 4e 75 6d 29 3b 0d 09 | 69 66 20 28 6f 65 20 21 |fNum);..|if (oe !|
|000024c0| 3d 20 6e 6f 45 72 72 29 | 20 7b 0d 09 09 4f 53 45 |= noErr)| {...OSE|
|000024d0| 72 72 6f 72 41 6c 65 72 | 74 28 45 53 5f 43 61 75 |rrorAler|t(ES_Cau|
|000024e0| 74 69 6f 6e 2c 20 22 48 | 4f 70 65 6e 22 2c 20 6f |tion, "H|Open", o|
|000024f0| 65 29 3b 0d 09 09 72 65 | 74 75 72 6e 3b 0d 09 7d |e);...re|turn;..}|
|00002500| 0d 0d 09 64 57 69 6e 2d | 3e 77 6f 72 6b 53 70 65 |...dWin-|>workSpe|
|00002510| 63 20 3d 20 77 6f 72 6b | 53 70 65 63 3b 0d 09 64 |c = work|Spec;..d|
|00002520| 57 69 6e 2d 3e 77 6f 72 | 6b 52 65 66 4e 75 6d 20 |Win->wor|kRefNum |
|00002530| 3d 20 72 65 66 4e 75 6d | 3b 0d 09 64 57 69 6e 2d |= refNum|;..dWin-|
|00002540| 3e 77 6f 72 6b 42 79 74 | 65 73 57 72 69 74 74 65 |>workByt|esWritte|
|00002550| 6e 20 3d 20 30 4c 3b 0d | 0d 09 64 57 69 6e 2d 3e |n = 0L;.|..dWin->|
|00002560| 66 69 6c 65 54 79 70 65 | 20 3d 20 70 62 2e 66 69 |fileType| = pb.fi|
|00002570| 6c 65 50 61 72 61 6d 2e | 69 6f 46 6c 46 6e 64 72 |leParam.|ioFlFndr|
|00002580| 49 6e 66 6f 2e 66 64 54 | 79 70 65 3b 0d 09 64 57 |Info.fdT|ype;..dW|
|00002590| 69 6e 2d 3e 63 72 65 61 | 74 6f 72 20 3d 20 70 62 |in->crea|tor = pb|
|000025a0| 2e 66 69 6c 65 50 61 72 | 61 6d 2e 69 6f 46 6c 46 |.filePar|am.ioFlF|
|000025b0| 6e 64 72 49 6e 66 6f 2e | 66 64 43 72 65 61 74 6f |ndrInfo.|fdCreato|
|000025c0| 72 3b 0d 09 64 57 69 6e | 2d 3e 63 72 65 61 74 69 |r;..dWin|->creati|
|000025d0| 6f 6e 44 61 74 65 20 3d | 20 20 70 62 2e 66 69 6c |onDate =| pb.fil|
|000025e0| 65 50 61 72 61 6d 2e 69 | 6f 46 6c 43 72 44 61 74 |eParam.i|oFlCrDat|
|000025f0| 3b 0d 0d 09 74 68 65 57 | 69 6e 64 6f 77 20 3d 20 |;...theW|indow = |
|00002600| 49 6e 69 74 4f 62 6a 65 | 63 74 57 69 6e 64 6f 77 |InitObje|ctWindow|
|00002610| 28 4d 61 69 6e 57 49 4e | 44 2c 20 28 4f 62 6a 65 |(MainWIN|D, (Obje|
|00002620| 63 74 57 69 6e 64 6f 77 | 50 74 72 29 20 64 57 69 |ctWindow|Ptr) dWi|
|00002630| 6e 2c 66 61 6c 73 65 29 | 3b 0d 09 53 65 74 52 65 |n,false)|;..SetRe|
|00002640| 63 74 28 26 72 2c 20 30 | 2c 20 30 2c 20 4d 61 78 |ct(&r, 0|, 0, Max|
|00002650| 57 69 6e 64 6f 77 57 69 | 64 74 68 2b 53 42 61 72 |WindowWi|dth+SBar|
|00002660| 53 69 7a 65 2d 31 2c 20 | 67 4d 61 78 48 65 69 67 |Size-1, |gMaxHeig|
|00002670| 68 74 20 2d 20 36 34 29 | 3b 0d 0d 09 64 57 69 6e |ht - 64)|;...dWin|
|00002680| 2d 3e 6c 69 6e 65 73 50 | 65 72 50 61 67 65 20 3d |->linesP|erPage =|
|00002690| 20 28 28 72 2e 62 6f 74 | 74 6f 6d 20 2d 20 53 42 | ((r.bot|tom - SB|
|000026a0| 61 72 53 69 7a 65 29 20 | 2d 20 54 6f 70 4d 61 72 |arSize) |- TopMar|
|000026b0| 67 69 6e 20 2d 20 42 6f | 74 4d 61 72 67 69 6e 20 |gin - Bo|tMargin |
|000026c0| 2d 20 48 65 61 64 65 72 | 48 65 69 67 68 74 29 2f |- Header|Height)/|
|000026d0| 4c 69 6e 65 48 65 69 67 | 68 74 3b 0d 0d 09 69 66 |LineHeig|ht;...if|
|000026e0| 20 28 28 64 57 69 6e 2d | 3e 6c 69 6e 65 73 50 65 | ((dWin-|>linesPe|
|000026f0| 72 50 61 67 65 2d 31 29 | 20 2a 20 31 36 4c 20 3e |rPage-1)| * 16L >|
|00002700| 20 64 57 69 6e 2d 3e 66 | 69 6c 65 53 69 7a 65 29 | dWin->f|ileSize)|
|00002710| 0d 09 09 72 2e 62 6f 74 | 74 6f 6d 20 2d 3d 20 4c |...r.bot|tom -= L|
|00002720| 69 6e 65 48 65 69 67 68 | 74 20 2a 20 28 28 28 64 |ineHeigh|t * (((d|
|00002730| 57 69 6e 2d 3e 6c 69 6e | 65 73 50 65 72 50 61 67 |Win->lin|esPerPag|
|00002740| 65 2d 31 29 20 2a 20 31 | 36 4c 29 20 2d 20 64 57 |e-1) * 1|6L) - dW|
|00002750| 69 6e 2d 3e 66 69 6c 65 | 53 69 7a 65 29 2f 31 36 |in->file|Size)/16|
|00002760| 3b 0d 09 69 66 20 28 72 | 2e 62 6f 74 74 6f 6d 20 |;..if (r|.bottom |
|00002770| 3c 20 53 42 61 72 53 69 | 7a 65 2b 54 6f 70 4d 61 |< SBarSi|ze+TopMa|
|00002780| 72 67 69 6e 2b 42 6f 74 | 4d 61 72 67 69 6e 2b 48 |rgin+Bot|Margin+H|
|00002790| 65 61 64 65 72 48 65 69 | 67 68 74 2b 4c 69 6e 65 |eaderHei|ght+Line|
|000027a0| 48 65 69 67 68 74 2a 33 | 29 0d 09 09 72 2e 62 6f |Height*3|)...r.bo|
|000027b0| 74 74 6f 6d 20 3d 20 53 | 42 61 72 53 69 7a 65 2b |ttom = S|BarSize+|
|000027c0| 54 6f 70 4d 61 72 67 69 | 6e 2b 42 6f 74 4d 61 72 |TopMargi|n+BotMar|
|000027d0| 67 69 6e 2b 48 65 61 64 | 65 72 48 65 69 67 68 74 |gin+Head|erHeight|
|000027e0| 2b 4c 69 6e 65 48 65 69 | 67 68 74 2a 33 3b 0d 0d |+LineHei|ght*3;..|
|000027f0| 09 53 69 7a 65 57 69 6e | 64 6f 77 28 74 68 65 57 |.SizeWin|dow(theW|
|00002800| 69 6e 64 6f 77 2c 72 2e | 72 69 67 68 74 2d 31 2c |indow,r.|right-1,|
|00002810| 72 2e 62 6f 74 74 6f 6d | 2c 74 72 75 65 29 3b 0d |r.bottom|,true);.|
|00002820| 09 53 65 74 52 65 63 74 | 28 26 72 2c 20 30 2c 20 |.SetRect|(&r, 0, |
|00002830| 30 2c 20 4d 61 78 57 69 | 6e 64 6f 77 57 69 64 74 |0, MaxWi|ndowWidt|
|00002840| 68 2b 53 42 61 72 53 69 | 7a 65 2d 31 2c 20 67 4d |h+SBarSi|ze-1, gM|
|00002850| 61 78 48 65 69 67 68 74 | 20 2d 20 34 34 29 3b 0d |axHeight| - 44);.|
|00002860| 09 4f 66 66 73 65 74 52 | 65 63 74 28 26 72 2c 33 |.OffsetR|ect(&r,3|
|00002870| 2c 34 31 29 3b 0d 09 28 | 28 57 53 74 61 74 65 44 |,41);..(|(WStateD|
|00002880| 61 74 61 20 2a 29 20 2a | 28 28 57 69 6e 64 6f 77 |ata *) *|((Window|
|00002890| 50 65 65 6b 29 20 74 68 | 65 57 69 6e 64 6f 77 29 |Peek) th|eWindow)|
|000028a0| 2d 3e 64 61 74 61 48 61 | 6e 64 6c 65 29 2d 3e 73 |->dataHa|ndle)->s|
|000028b0| 74 64 53 74 61 74 65 20 | 3d 20 72 3b 0d 09 53 65 |tdState |= r;..Se|
|000028c0| 74 57 54 69 74 6c 65 28 | 74 68 65 57 69 6e 64 6f |tWTitle(|theWindo|
|000028d0| 77 2c 20 66 73 53 70 65 | 63 2d 3e 6e 61 6d 65 29 |w, fsSpe|c->name)|
|000028e0| 3b 0d 09 64 57 69 6e 2d | 3e 66 73 53 70 65 63 20 |;..dWin-|>fsSpec |
|000028f0| 3d 20 2a 66 73 53 70 65 | 63 3b 0d 09 64 57 69 6e |= *fsSpe|c;..dWin|
|00002900| 2d 3e 64 65 73 74 53 70 | 65 63 20 3d 20 64 57 69 |->destSp|ec = dWi|
|00002910| 6e 2d 3e 66 73 53 70 65 | 63 3b 0d 0d 09 28 28 4f |n->fsSpe|c;...((O|
|00002920| 62 6a 65 63 74 57 69 6e | 64 6f 77 50 74 72 29 20 |bjectWin|dowPtr) |
|00002930| 74 68 65 57 69 6e 64 6f | 77 29 2d 3e 44 72 61 77 |theWindo|w)->Draw|
|00002940| 20 3d 20 4d 79 44 72 61 | 77 3b 0d 09 28 28 4f 62 | = MyDra|w;..((Ob|
|00002950| 6a 65 63 74 57 69 6e 64 | 6f 77 50 74 72 29 20 74 |jectWind|owPtr) t|
|00002960| 68 65 57 69 6e 64 6f 77 | 29 2d 3e 49 64 6c 65 20 |heWindow|)->Idle |
|00002970| 3d 20 4d 79 49 64 6c 65 | 3b 0d 09 28 28 4f 62 6a |= MyIdle|;..((Obj|
|00002980| 65 63 74 57 69 6e 64 6f | 77 50 74 72 29 20 74 68 |ectWindo|wPtr) th|
|00002990| 65 57 69 6e 64 6f 77 29 | 2d 3e 48 61 6e 64 6c 65 |eWindow)|->Handle|
|000029a0| 43 6c 69 63 6b 20 3d 20 | 4d 79 48 61 6e 64 6c 65 |Click = |MyHandle|
|000029b0| 43 6c 69 63 6b 3b 0d 09 | 28 28 4f 62 6a 65 63 74 |Click;..|((Object|
|000029c0| 57 69 6e 64 6f 77 50 74 | 72 29 20 74 68 65 57 69 |WindowPt|r) theWi|
|000029d0| 6e 64 6f 77 29 2d 3e 44 | 69 73 70 6f 73 65 20 3d |ndow)->D|ispose =|
|000029e0| 20 44 69 73 70 6f 73 65 | 45 64 69 74 57 69 6e 64 | Dispose|EditWind|
|000029f0| 6f 77 3b 0d 09 28 28 4f | 62 6a 65 63 74 57 69 6e |ow;..((O|bjectWin|
|00002a00| 64 6f 77 50 74 72 29 20 | 74 68 65 57 69 6e 64 6f |dowPtr) |theWindo|
|00002a10| 77 29 2d 3e 50 72 6f 63 | 65 73 73 4b 65 79 20 3d |w)->Proc|essKey =|
|00002a20| 20 4d 79 50 72 6f 63 65 | 73 73 4b 65 79 3b 0d 09 | MyProce|ssKey;..|
|00002a30| 28 28 4f 62 6a 65 63 74 | 57 69 6e 64 6f 77 50 74 |((Object|WindowPt|
|00002a40| 72 29 20 74 68 65 57 69 | 6e 64 6f 77 29 2d 3e 53 |r) theWi|ndow)->S|
|00002a50| 61 76 65 20 3d 20 53 61 | 76 65 43 6f 6e 74 65 6e |ave = Sa|veConten|
|00002a60| 74 73 3b 0d 09 28 28 4f | 62 6a 65 63 74 57 69 6e |ts;..((O|bjectWin|
|00002a70| 64 6f 77 50 74 72 29 20 | 74 68 65 57 69 6e 64 6f |dowPtr) |theWindo|
|00002a80| 77 29 2d 3e 53 61 76 65 | 41 73 20 3d 20 53 61 76 |w)->Save|As = Sav|
|00002a90| 65 41 73 43 6f 6e 74 65 | 6e 74 73 3b 0d 09 28 28 |eAsConte|nts;..((|
|00002aa0| 4f 62 6a 65 63 74 57 69 | 6e 64 6f 77 50 74 72 29 |ObjectWi|ndowPtr)|
|00002ab0| 20 74 68 65 57 69 6e 64 | 6f 77 29 2d 3e 52 65 76 | theWind|ow)->Rev|
|00002ac0| 65 72 74 20 3d 20 52 65 | 76 65 72 74 43 6f 6e 74 |ert = Re|vertCont|
|00002ad0| 65 6e 74 73 3b 0d 09 0d | 09 2f 2f 20 53 68 6f 77 |ents;...|.// Show|
|00002ae0| 20 74 68 65 20 77 69 6e | 64 6f 77 0d 09 53 68 6f | the win|dow..Sho|
|00002af0| 77 57 69 6e 64 6f 77 28 | 74 68 65 57 69 6e 64 6f |wWindow(|theWindo|
|00002b00| 77 29 3b 0d 0d 09 2f 2f | 20 4d 61 6b 65 20 69 74 |w);...//| Make it|
|00002b10| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 67 72 61 | the cur|rent gra|
|00002b20| 66 70 6f 72 74 0d 09 53 | 65 74 50 6f 72 74 28 74 |fport..S|etPort(t|
|00002b30| 68 65 57 69 6e 64 6f 77 | 29 3b 0d 09 0d 09 64 57 |heWindow|);....dW|
|00002b40| 69 6e 2d 3e 6c 69 6e 65 | 73 50 65 72 50 61 67 65 |in->line|sPerPage|
|00002b50| 20 3d 20 28 28 74 68 65 | 57 69 6e 64 6f 77 2d 3e | = ((the|Window->|
|00002b60| 70 6f 72 74 52 65 63 74 | 2e 62 6f 74 74 6f 6d 20 |portRect|.bottom |
|00002b70| 2d 20 53 42 61 72 53 69 | 7a 65 29 20 2d 20 54 6f |- SBarSi|ze) - To|
|00002b80| 70 4d 61 72 67 69 6e 20 | 2d 20 42 6f 74 4d 61 72 |pMargin |- BotMar|
|00002b90| 67 69 6e 20 2d 20 48 65 | 61 64 65 72 48 65 69 67 |gin - He|aderHeig|
|00002ba0| 68 74 29 2f 4c 69 6e 65 | 48 65 69 67 68 74 3b 0d |ht)/Line|Height;.|
|00002bb0| 09 64 57 69 6e 2d 3e 73 | 74 61 72 74 53 65 6c 20 |.dWin->s|tartSel |
|00002bc0| 3d 20 64 57 69 6e 2d 3e | 65 6e 64 53 65 6c 20 3d |= dWin->|endSel =|
|00002bd0| 20 30 4c 3b 0d 09 64 57 | 69 6e 2d 3e 65 64 69 74 | 0L;..dW|in->edit|
|00002be0| 4d 6f 64 65 20 3d 20 45 | 4d 5f 48 65 78 3b 0d 0d |Mode = E|M_Hex;..|
|00002bf0| 09 53 65 74 75 70 53 63 | 72 6f 6c 6c 42 61 72 73 |.SetupSc|rollBars|
|00002c00| 28 64 57 69 6e 29 3b 0d | 0d 09 4c 6f 61 64 46 69 |(dWin);.|..LoadFi|
|00002c10| 6c 65 28 64 57 69 6e 29 | 3b 0d 7d 0d 0d 76 6f 69 |le(dWin)|;.}..voi|
|00002c20| 64 20 44 69 73 70 6f 73 | 65 45 64 69 74 57 69 6e |d Dispos|eEditWin|
|00002c30| 64 6f 77 28 57 69 6e 64 | 6f 77 50 74 72 20 74 68 |dow(Wind|owPtr th|
|00002c40| 65 57 69 6e 64 6f 77 29 | 0d 7b 0d 09 45 64 69 74 |eWindow)|.{..Edit|
|00002c50| 57 69 6e 64 6f 77 50 74 | 72 09 64 57 69 6e 20 3d |WindowPt|r.dWin =|
|00002c60| 20 28 45 64 69 74 57 69 | 6e 64 6f 77 50 74 72 29 | (EditWi|ndowPtr)|
|00002c70| 20 74 68 65 57 69 6e 64 | 6f 77 3b 0d 0d 09 55 6e | theWind|ow;...Un|
|00002c80| 6c 6f 61 64 46 69 6c 65 | 28 64 57 69 6e 29 3b 0d |loadFile|(dWin);.|
|00002c90| 09 69 66 20 28 64 57 69 | 6e 2d 3e 72 65 66 4e 75 |.if (dWi|n->refNu|
|00002ca0| 6d 29 0d 09 09 46 53 43 | 6c 6f 73 65 28 64 57 69 |m)...FSC|lose(dWi|
|00002cb0| 6e 2d 3e 72 65 66 4e 75 | 6d 29 3b 0d 09 69 66 20 |n->refNu|m);..if |
|00002cc0| 28 64 57 69 6e 2d 3e 77 | 6f 72 6b 52 65 66 4e 75 |(dWin->w|orkRefNu|
|00002cd0| 6d 29 20 7b 0d 09 09 46 | 53 43 6c 6f 73 65 28 64 |m) {...F|SClose(d|
|00002ce0| 57 69 6e 2d 3e 77 6f 72 | 6b 52 65 66 4e 75 6d 29 |Win->wor|kRefNum)|
|00002cf0| 3b 0d 09 09 48 44 65 6c | 65 74 65 28 64 57 69 6e |;...HDel|ete(dWin|
|00002d00| 2d 3e 77 6f 72 6b 53 70 | 65 63 2e 76 52 65 66 4e |->workSp|ec.vRefN|
|00002d10| 75 6d 2c 20 64 57 69 6e | 2d 3e 77 6f 72 6b 53 70 |um, dWin|->workSp|
|00002d20| 65 63 2e 70 61 72 49 44 | 2c 20 64 57 69 6e 2d 3e |ec.parID|, dWin->|
|00002d30| 77 6f 72 6b 53 70 65 63 | 2e 6e 61 6d 65 29 3b 0d |workSpec|.name);.|
|00002d40| 09 7d 0d 09 44 65 66 61 | 75 6c 74 44 69 73 70 6f |.}..Defa|ultDispo|
|00002d50| 73 65 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 09 |se(theWi|ndow);..|
|00002d60| 4d 79 41 64 6a 75 73 74 | 4d 65 6e 75 73 28 29 3b |MyAdjust|Menus();|
|00002d70| 0d 7d 0d 0d 42 6f 6f 6c | 65 61 6e 09 43 6c 6f 73 |.}..Bool|ean.Clos|
|00002d80| 65 45 64 69 74 57 69 6e | 64 6f 77 28 57 69 6e 64 |eEditWin|dow(Wind|
|00002d90| 6f 77 50 74 72 20 74 68 | 65 57 69 6e 64 6f 77 29 |owPtr th|eWindow)|
|00002da0| 0d 7b 0d 09 53 74 72 36 | 33 09 09 09 66 69 6c 65 |.{..Str6|3...file|
|00002db0| 4e 61 6d 65 3b 0d 09 45 | 64 69 74 57 69 6e 64 6f |Name;..E|ditWindo|
|00002dc0| 77 50 74 72 09 64 57 69 | 6e 20 3d 20 28 45 64 69 |wPtr.dWi|n = (Edi|
|00002dd0| 74 57 69 6e 64 6f 77 50 | 74 72 29 20 74 68 65 57 |tWindowP|tr) theW|
|00002de0| 69 6e 64 6f 77 3b 0d 0d | 09 4d 79 53 65 74 43 75 |indow;..|.MySetCu|
|00002df0| 72 73 6f 72 28 43 5f 41 | 72 72 6f 77 29 3b 0d 0d |rsor(C_A|rrow);..|
|00002e00| 09 69 66 20 28 64 57 69 | 6e 2d 3e 64 69 72 74 79 |.if (dWi|n->dirty|
|00002e10| 46 6c 61 67 29 20 7b 0d | 09 09 47 65 74 57 54 69 |Flag) {.|..GetWTi|
|00002e20| 74 6c 65 28 74 68 65 57 | 69 6e 64 6f 77 2c 20 66 |tle(theW|indow, f|
|00002e30| 69 6c 65 4e 61 6d 65 29 | 3b 0d 09 09 50 61 72 61 |ileName)|;...Para|
|00002e40| 6d 54 65 78 74 28 66 69 | 6c 65 4e 61 6d 65 2c 20 |mText(fi|leName, |
|00002e50| 22 5c 70 22 2c 22 5c 70 | 22 2c 22 5c 70 22 29 3b |"\p","\p|","\p");|
|00002e60| 0d 09 09 73 77 69 74 63 | 68 20 28 41 6c 65 72 74 |...switc|h (Alert|
|00002e70| 28 53 61 76 65 43 68 61 | 6e 67 65 73 41 4c 52 54 |(SaveCha|ngesALRT|
|00002e80| 2c 20 4e 55 4c 4c 29 29 | 20 7b 0d 09 09 63 61 73 |, NULL))| {...cas|
|00002e90| 65 20 4f 4b 3a 09 09 0d | 09 09 09 53 61 76 65 43 |e OK:...|...SaveC|
|00002ea0| 6f 6e 74 65 6e 74 73 28 | 74 68 65 57 69 6e 64 6f |ontents(|theWindo|
|00002eb0| 77 29 3b 09 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |w);.....|break;..|
|00002ec0| 09 63 61 73 65 20 43 61 | 6e 63 65 6c 3a 0d 09 09 |.case Ca|ncel:...|
|00002ed0| 09 72 65 74 75 72 6e 20 | 66 61 6c 73 65 3b 0d 09 |.return |false;..|
|00002ee0| 09 63 61 73 65 20 33 3a | 0d 09 09 09 2f 2f 20 44 |.case 3:|....// D|
|00002ef0| 69 73 63 61 72 64 0d 09 | 09 09 62 72 65 61 6b 3b |iscard..|..break;|
|00002f00| 0d 09 09 7d 0d 09 7d 0d | 09 28 28 4f 62 6a 65 63 |...}..}.|.((Objec|
|00002f10| 74 57 69 6e 64 6f 77 50 | 74 72 29 20 64 57 69 6e |tWindowP|tr) dWin|
|00002f20| 29 2d 3e 44 69 73 70 6f | 73 65 28 74 68 65 57 69 |)->Dispo|se(theWi|
|00002f30| 6e 64 6f 77 29 3b 0d 09 | 72 65 74 75 72 6e 20 74 |ndow);..|return t|
|00002f40| 72 75 65 3b 0d 7d 0d 0d | 42 6f 6f 6c 65 61 6e 20 |rue;.}..|Boolean |
|00002f50| 43 6c 6f 73 65 41 6c 6c | 45 64 69 74 57 69 6e 64 |CloseAll|EditWind|
|00002f60| 6f 77 73 28 29 0d 7b 0d | 09 57 69 6e 64 6f 77 50 |ows().{.|.WindowP|
|00002f70| 65 65 6b 09 77 70 3b 0d | 09 77 70 20 3d 20 28 57 |eek.wp;.|.wp = (W|
|00002f80| 69 6e 64 6f 77 50 65 65 | 6b 29 20 46 72 6f 6e 74 |indowPee|k) Front|
|00002f90| 57 69 6e 64 6f 77 28 29 | 3b 0d 09 77 68 69 6c 65 |Window()|;..while|
|00002fa0| 20 28 77 70 29 20 7b 0d | 09 09 69 66 20 28 77 70 | (wp) {.|..if (wp|
|00002fb0| 2d 3e 77 69 6e 64 6f 77 | 4b 69 6e 64 20 3c 20 30 |->window|Kind < 0|
|00002fc0| 29 0d 09 09 20 09 43 6c | 6f 73 65 44 65 73 6b 41 |)... .Cl|oseDeskA|
|00002fd0| 63 63 28 77 70 2d 3e 77 | 69 6e 64 6f 77 4b 69 6e |cc(wp->w|indowKin|
|00002fe0| 64 29 3b 0d 09 09 65 6c | 73 65 20 69 66 20 28 77 |d);...el|se if (w|
|00002ff0| 70 2d 3e 72 65 66 43 6f | 6e 20 3d 3d 20 4d 79 57 |p->refCo|n == MyW|
|00003000| 69 6e 64 6f 77 49 44 29 | 20 7b 0d 09 09 09 69 66 |indowID)| {....if|
|00003010| 20 28 21 43 6c 6f 73 65 | 45 64 69 74 57 69 6e 64 | (!Close|EditWind|
|00003020| 6f 77 28 28 57 69 6e 64 | 6f 77 50 74 72 29 20 77 |ow((Wind|owPtr) w|
|00003030| 70 29 29 0d 09 09 09 09 | 72 65 74 75 72 6e 20 66 |p)).....|return f|
|00003040| 61 6c 73 65 3b 0d 09 09 | 7d 0d 09 09 65 6c 73 65 |alse;...|}...else|
|00003050| 20 69 66 20 28 28 57 69 | 6e 64 6f 77 50 74 72 29 | if ((Wi|ndowPtr)|
|00003060| 20 77 70 20 3d 3d 20 67 | 53 65 61 72 63 68 57 69 | wp == g|SearchWi|
|00003070| 6e 29 20 7b 0d 09 09 09 | 44 69 73 70 6f 73 44 69 |n) {....|DisposDi|
|00003080| 61 6c 6f 67 28 67 53 65 | 61 72 63 68 57 69 6e 29 |alog(gSe|archWin)|
|00003090| 3b 0d 09 09 09 67 53 65 | 61 72 63 68 57 69 6e 20 |;....gSe|archWin |
|000030a0| 3d 20 4e 55 4c 4c 3b 0d | 09 09 7d 0d 09 09 65 6c |= NULL;.|..}...el|
|000030b0| 73 65 0d 09 09 09 72 65 | 74 75 72 6e 20 66 61 6c |se....re|turn fal|
|000030c0| 73 65 3b 0d 09 09 77 70 | 20 3d 20 28 57 69 6e 64 |se;...wp| = (Wind|
|000030d0| 6f 77 50 65 65 6b 29 20 | 46 72 6f 6e 74 57 69 6e |owPeek) |FrontWin|
|000030e0| 64 6f 77 28 29 3b 0d 09 | 7d 0d 09 72 65 74 75 72 |dow();..|}..retur|
|000030f0| 6e 20 74 72 75 65 3b 0d | 7d 0d 0d 2f 2f 20 52 65 |n true;.|}..// Re|
|00003100| 73 70 6f 6e 64 20 74 6f | 20 61 6e 20 75 70 64 61 |spond to| an upda|
|00003110| 74 65 20 65 76 65 6e 74 | 20 2d 20 42 65 67 69 6e |te event| - Begin|
|00003120| 55 70 64 61 74 65 20 68 | 61 73 20 61 6c 72 65 61 |Update h|as alrea|
|00003130| 64 79 20 62 65 65 6e 20 | 63 61 6c 6c 65 64 2e 0d |dy been |called..|
|00003140| 2f 2f 0d 0d 76 6f 69 64 | 20 4d 79 44 72 61 77 28 |//..void| MyDraw(|
|00003150| 57 69 6e 64 6f 77 50 74 | 72 20 74 68 65 57 69 6e |WindowPt|r theWin|
|00003160| 64 6f 77 29 0d 7b 0d 09 | 52 67 6e 48 61 6e 64 6c |dow).{..|RgnHandl|
|00003170| 65 09 09 72 67 31 2c 72 | 67 32 2c 72 67 33 3b 0d |e..rg1,r|g2,rg3;.|
|00003180| 09 52 65 63 74 09 09 09 | 72 33 3b 0d 0d 09 72 67 |.Rect...|r3;...rg|
|00003190| 31 20 3d 20 4e 65 77 52 | 67 6e 28 29 3b 0d 09 72 |1 = NewR|gn();..r|
|000031a0| 67 32 20 3d 20 4e 65 77 | 52 67 6e 28 29 3b 0d 09 |g2 = New|Rgn();..|
|000031b0| 72 67 33 20 3d 20 4e 65 | 77 52 67 6e 28 29 3b 0d |rg3 = Ne|wRgn();.|
|000031c0| 09 52 65 63 74 52 67 6e | 28 72 67 31 2c 20 26 74 |.RectRgn|(rg1, &t|
|000031d0| 68 65 57 69 6e 64 6f 77 | 2d 3e 70 6f 72 74 52 65 |heWindow|->portRe|
|000031e0| 63 74 29 3b 0d 09 52 65 | 63 74 52 67 6e 28 72 67 |ct);..Re|ctRgn(rg|
|000031f0| 32 2c 20 26 67 42 69 74 | 4d 61 70 2e 62 6f 75 6e |2, &gBit|Map.boun|
|00003200| 64 73 29 3b 0d 09 72 33 | 20 3d 20 74 68 65 57 69 |ds);..r3| = theWi|
|00003210| 6e 64 6f 77 2d 3e 70 6f | 72 74 52 65 63 74 3b 0d |ndow->po|rtRect;.|
|00003220| 09 72 33 2e 72 69 67 68 | 74 20 2d 3d 20 53 42 61 |.r3.righ|t -= SBa|
|00003230| 72 53 69 7a 65 2d 31 3b | 0d 09 72 33 2e 62 6f 74 |rSize-1;|..r3.bot|
|00003240| 74 6f 6d 20 2d 3d 20 53 | 42 61 72 53 69 7a 65 2d |tom -= S|BarSize-|
|00003250| 31 3b 0d 09 52 65 63 74 | 52 67 6e 28 72 67 33 2c |1;..Rect|Rgn(rg3,|
|00003260| 20 26 72 33 29 3b 0d 09 | 53 65 63 74 52 67 6e 28 | &r3);..|SectRgn(|
|00003270| 72 67 32 2c 72 67 33 2c | 72 67 32 29 3b 09 2f 2f |rg2,rg3,|rg2);.//|
|00003280| 20 49 6e 74 65 72 73 65 | 63 74 69 6f 6e 20 6f 66 | Interse|ction of|
|00003290| 20 6f 66 66 73 63 72 65 | 65 6e 20 61 6e 64 20 76 | offscre|en and v|
|000032a0| 61 6c 69 64 20 63 6f 6e | 74 65 6e 74 20 61 72 65 |alid con|tent are|
|000032b0| 61 0d 09 44 69 66 66 52 | 67 6e 28 72 67 31 2c 72 |a..DiffR|gn(rg1,r|
|000032c0| 67 32 2c 72 67 31 29 3b | 09 2f 2f 20 53 75 62 74 |g2,rg1);|.// Subt|
|000032d0| 72 61 63 74 20 66 72 6f | 6d 20 77 68 6f 6c 65 20 |ract fro|m whole |
|000032e0| 63 6f 6e 74 65 6e 74 20 | 61 72 65 61 0d 09 45 72 |content |area..Er|
|000032f0| 61 73 65 52 67 6e 28 72 | 67 31 29 3b 0d 09 44 69 |aseRgn(r|g1);..Di|
|00003300| 73 70 6f 73 65 52 67 6e | 28 72 67 31 29 3b 0d 09 |sposeRgn|(rg1);..|
|00003310| 44 69 73 70 6f 73 65 52 | 67 6e 28 72 67 32 29 3b |DisposeR|gn(rg2);|
|00003320| 0d 09 44 69 73 70 6f 73 | 65 52 67 6e 28 72 67 33 |..Dispos|eRgn(rg3|
|00003330| 29 3b 0d 09 2f 2f 20 44 | 72 61 77 20 74 68 65 20 |);..// D|raw the |
|00003340| 67 72 6f 77 20 69 63 6f | 6e 20 69 6e 20 74 68 65 |grow ico|n in the|
|00003350| 20 63 6f 72 6e 65 72 0d | 09 2f 2f 20 45 72 61 73 | corner.|.// Eras|
|00003360| 65 52 65 63 74 28 26 74 | 68 65 57 69 6e 64 6f 77 |eRect(&t|heWindow|
|00003370| 2d 3e 70 6f 72 74 52 65 | 63 74 29 3b 0d 09 44 72 |->portRe|ct);..Dr|
|00003380| 61 77 43 6f 6e 74 72 6f | 6c 73 28 74 68 65 57 69 |awContro|ls(theWi|
|00003390| 6e 64 6f 77 29 3b 0d 09 | 44 72 61 77 47 72 6f 77 |ndow);..|DrawGrow|
|000033a0| 49 63 6f 6e 28 74 68 65 | 57 69 6e 64 6f 77 29 3b |Icon(the|Window);|
|000033b0| 0d 09 44 72 61 77 50 61 | 67 65 28 28 45 64 69 74 |..DrawPa|ge((Edit|
|000033c0| 57 69 6e 64 6f 77 50 74 | 72 29 20 74 68 65 57 69 |WindowPt|r) theWi|
|000033d0| 6e 64 6f 77 29 3b 0d 09 | 55 70 64 61 74 65 4f 6e |ndow);..|UpdateOn|
|000033e0| 73 63 72 65 65 6e 28 74 | 68 65 57 69 6e 64 6f 77 |screen(t|heWindow|
|000033f0| 29 3b 0d 7d 0d 0d 76 6f | 69 64 20 55 70 64 61 74 |);.}..vo|id Updat|
|00003400| 65 4f 6e 73 63 72 65 65 | 6e 28 57 69 6e 64 6f 77 |eOnscree|n(Window|
|00003410| 50 74 72 20 74 68 65 57 | 69 6e 64 6f 77 29 0d 7b |Ptr theW|indow).{|
|00003420| 0d 09 52 65 63 74 09 09 | 09 72 31 2c 72 32 2c 72 |..Rect..|.r1,r2,r|
|00003430| 33 3b 0d 09 45 64 69 74 | 57 69 6e 64 6f 77 50 74 |3;..Edit|WindowPt|
|00003440| 72 09 64 57 69 6e 3b 0d | 0d 09 67 43 75 72 73 6f |r.dWin;.|..gCurso|
|00003450| 72 46 6c 61 67 20 3d 20 | 66 61 6c 73 65 3b 0d 09 |rFlag = |false;..|
|00003460| 72 31 20 3d 20 67 42 69 | 74 4d 61 70 2e 62 6f 75 |r1 = gBi|tMap.bou|
|00003470| 6e 64 73 3b 0d 09 72 32 | 20 3d 20 74 68 65 57 69 |nds;..r2| = theWi|
|00003480| 6e 64 6f 77 2d 3e 70 6f | 72 74 52 65 63 74 3b 0d |ndow->po|rtRect;.|
|00003490| 09 72 32 2e 72 69 67 68 | 74 20 2d 3d 20 53 42 61 |.r2.righ|t -= SBa|
|000034a0| 72 53 69 7a 65 20 2d 20 | 31 3b 0d 09 72 32 2e 62 |rSize - |1;..r2.b|
|000034b0| 6f 74 74 6f 6d 20 2d 3d | 20 53 42 61 72 53 69 7a |ottom -=| SBarSiz|
|000034c0| 65 20 2d 20 31 3b 0d 09 | 53 65 63 74 52 65 63 74 |e - 1;..|SectRect|
|000034d0| 28 26 72 31 2c 26 72 32 | 2c 26 72 33 29 3b 0d 09 |(&r1,&r2|,&r3);..|
|000034e0| 53 65 74 50 6f 72 74 28 | 74 68 65 57 69 6e 64 6f |SetPort(|theWindo|
|000034f0| 77 29 3b 0d 09 43 6f 70 | 79 42 69 74 73 28 26 67 |w);..Cop|yBits(&g|
|00003500| 42 69 74 4d 61 70 2c 26 | 74 68 65 57 69 6e 64 6f |BitMap,&|theWindo|
|00003510| 77 2d 3e 70 6f 72 74 42 | 69 74 73 2c 26 72 33 2c |w->portB|its,&r3,|
|00003520| 26 72 33 2c 73 72 63 43 | 6f 70 79 2c 30 4c 29 3b |&r3,srcC|opy,0L);|
|00003530| 0d 0d 09 64 57 69 6e 20 | 3d 20 28 45 64 69 74 57 |...dWin |= (EditW|
|00003540| 69 6e 64 6f 77 50 74 72 | 29 20 74 68 65 57 69 6e |indowPtr|) theWin|
|00003550| 64 6f 77 3b 0d 09 69 66 | 20 28 64 57 69 6e 2d 3e |dow;..if| (dWin->|
|00003560| 65 6e 64 53 65 6c 20 3e | 20 64 57 69 6e 2d 3e 73 |endSel >| dWin->s|
|00003570| 74 61 72 74 53 65 6c 20 | 26 26 20 0d 09 09 64 57 |tartSel |&& ...dW|
|00003580| 69 6e 2d 3e 65 6e 64 53 | 65 6c 20 3e 3d 20 64 57 |in->endS|el >= dW|
|00003590| 69 6e 2d 3e 65 64 69 74 | 4f 66 66 73 65 74 20 26 |in->edit|Offset &|
|000035a0| 26 0d 09 09 64 57 69 6e | 2d 3e 73 74 61 72 74 53 |&...dWin|->startS|
|000035b0| 65 6c 20 3c 20 64 57 69 | 6e 2d 3e 65 64 69 74 4f |el < dWi|n->editO|
|000035c0| 66 66 73 65 74 2b 28 64 | 57 69 6e 2d 3e 6c 69 6e |ffset+(d|Win->lin|
|000035d0| 65 73 50 65 72 50 61 67 | 65 3c 3c 34 29 29 20 0d |esPerPag|e<<4)) .|
|000035e0| 09 09 49 6e 76 65 72 74 | 53 65 6c 65 63 74 69 6f |..Invert|Selectio|
|000035f0| 6e 28 64 57 69 6e 29 3b | 0d 7d 0d 0d 76 6f 69 64 |n(dWin);|.}..void|
|00003600| 20 4d 79 49 64 6c 65 28 | 57 69 6e 64 6f 77 50 74 | MyIdle(|WindowPt|
|00003610| 72 20 74 68 65 57 69 6e | 2c 20 45 76 65 6e 74 52 |r theWin|, EventR|
|00003620| 65 63 6f 72 64 20 2a 65 | 72 29 0d 7b 0d 09 45 64 |ecord *e|r).{..Ed|
|00003630| 69 74 57 69 6e 64 6f 77 | 50 74 72 09 64 57 69 6e |itWindow|Ptr.dWin|
|00003640| 20 3d 20 28 45 64 69 74 | 57 69 6e 64 6f 77 50 74 | = (Edit|WindowPt|
|00003650| 72 29 20 74 68 65 57 69 | 6e 3b 0d 09 42 6f 6f 6c |r) theWi|n;..Bool|
|00003660| 65 61 6e 09 09 09 66 72 | 6f 6e 74 57 69 6e 64 6f |ean...fr|ontWindo|
|00003670| 77 46 6c 61 67 3b 0d 09 | 50 6f 69 6e 74 09 09 09 |wFlag;..|Point...|
|00003680| 77 3b 0d 09 66 72 6f 6e | 74 57 69 6e 64 6f 77 46 |w;..fron|tWindowF|
|00003690| 6c 61 67 20 3d 20 28 74 | 68 65 57 69 6e 20 3d 3d |lag = (t|heWin ==|
|000036a0| 20 46 72 6f 6e 74 57 69 | 6e 64 6f 77 28 29 20 26 | FrontWi|ndow() &|
|000036b0| 26 0d 09 09 09 09 09 09 | 64 57 69 6e 2d 3e 6f 57 |&.......|dWin->oW|
|000036c0| 69 6e 2e 61 63 74 69 76 | 65 29 3b 0d 09 69 66 20 |in.activ|e);..if |
|000036d0| 28 66 72 6f 6e 74 57 69 | 6e 64 6f 77 46 6c 61 67 |(frontWi|ndowFlag|
|000036e0| 29 20 7b 0d 09 09 77 20 | 3d 20 65 72 2d 3e 77 68 |) {...w |= er->wh|
|000036f0| 65 72 65 3b 0d 09 09 53 | 65 74 50 6f 72 74 28 74 |ere;...S|etPort(t|
|00003700| 68 65 57 69 6e 29 3b 0d | 09 09 47 6c 6f 62 61 6c |heWin);.|..Global|
|00003710| 54 6f 4c 6f 63 61 6c 28 | 26 77 29 3b 0d 09 09 69 |ToLocal(|&w);...i|
|00003720| 66 20 28 77 2e 76 20 3e | 3d 20 48 65 61 64 65 72 |f (w.v >|= Header|
|00003730| 48 65 69 67 68 74 2b 54 | 6f 70 4d 61 72 67 69 6e |Height+T|opMargin|
|00003740| 20 26 26 20 0d 09 09 09 | 77 2e 76 20 3c 20 48 65 | && ....|w.v < He|
|00003750| 61 64 65 72 48 65 69 67 | 68 74 2b 54 6f 70 4d 61 |aderHeig|ht+TopMa|
|00003760| 72 67 69 6e 2b 28 64 57 | 69 6e 2d 3e 6c 69 6e 65 |rgin+(dW|in->line|
|00003770| 73 50 65 72 50 61 67 65 | 2a 4c 69 6e 65 48 65 69 |sPerPage|*LineHei|
|00003780| 67 68 74 29 29 0d 09 09 | 7b 0d 09 09 09 09 69 66 |ght))...|{.....if|
|00003790| 20 28 77 2e 68 20 3e 3d | 20 41 64 64 72 50 6f 73 | (w.h >=| AddrPos|
|000037a0| 2b 43 68 61 72 50 6f 73 | 28 48 65 78 53 74 61 72 |+CharPos|(HexStar|
|000037b0| 74 29 20 26 26 0d 09 09 | 09 09 09 77 2e 68 20 3c |t) &&...|...w.h <|
|000037c0| 20 41 64 64 72 50 6f 73 | 2b 43 68 61 72 50 6f 73 | AddrPos|+CharPos|
|000037d0| 28 48 65 78 53 74 61 72 | 74 29 2b 28 48 65 78 57 |(HexStar|t)+(HexW|
|000037e0| 69 64 74 68 3c 3c 34 29 | 29 20 0d 09 09 09 09 09 |idth<<4)|) ......|
|000037f0| 4d 79 53 65 74 43 75 72 | 73 6f 72 28 43 5f 49 42 |MySetCur|sor(C_IB|
|00003800| 65 61 6d 29 3b 0d 09 09 | 09 09 65 6c 73 65 20 69 |eam);...|..else i|
|00003810| 66 20 28 77 2e 68 20 3e | 3d 20 41 64 64 72 50 6f |f (w.h >|= AddrPo|
|00003820| 73 2b 43 68 61 72 50 6f | 73 28 41 73 63 69 69 53 |s+CharPo|s(AsciiS|
|00003830| 74 61 72 74 29 20 26 26 | 0d 09 09 09 09 09 09 20 |tart) &&|....... |
|00003840| 77 2e 68 20 3c 20 41 64 | 64 72 50 6f 73 2b 43 68 |w.h < Ad|drPos+Ch|
|00003850| 61 72 50 6f 73 28 41 73 | 63 69 69 53 74 61 72 74 |arPos(As|ciiStart|
|00003860| 29 2b 28 43 68 61 72 57 | 69 64 74 68 3c 3c 34 29 |)+(CharW|idth<<4)|
|00003870| 29 0d 09 09 09 09 09 4d | 79 53 65 74 43 75 72 73 |)......M|ySetCurs|
|00003880| 6f 72 28 43 5f 49 42 65 | 61 6d 29 3b 0d 09 09 09 |or(C_IBe|am);....|
|00003890| 09 65 6c 73 65 0d 09 09 | 09 09 09 4d 79 53 65 74 |.else...|...MySet|
|000038a0| 43 75 72 73 6f 72 28 43 | 5f 41 72 72 6f 77 29 3b |Cursor(C|_Arrow);|
|000038b0| 0d 09 09 7d 0d 09 09 65 | 6c 73 65 0d 09 09 09 4d |...}...e|lse....M|
|000038c0| 79 53 65 74 43 75 72 73 | 6f 72 28 43 5f 41 72 72 |ySetCurs|or(C_Arr|
|000038d0| 6f 77 29 3b 0d 0d 09 09 | 69 66 20 28 64 57 69 6e |ow);....|if (dWin|
|000038e0| 2d 3e 73 74 61 72 74 53 | 65 6c 20 3d 3d 20 64 57 |->startS|el == dW|
|000038f0| 69 6e 2d 3e 65 6e 64 53 | 65 6c 29 20 7b 0d 09 09 |in->endS|el) {...|
|00003900| 09 69 66 20 28 28 54 69 | 63 6b 73 20 26 20 30 78 |.if ((Ti|cks & 0x|
|00003910| 31 46 29 20 3c 20 30 78 | 31 30 29 0d 09 09 09 09 |1F) < 0x|10).....|
|00003920| 43 75 72 73 6f 72 4f 6e | 28 74 68 65 57 69 6e 29 |CursorOn|(theWin)|
|00003930| 3b 0d 09 09 09 65 6c 73 | 65 0d 09 09 09 09 43 75 |;....els|e.....Cu|
|00003940| 72 73 6f 72 4f 66 66 28 | 74 68 65 57 69 6e 29 3b |rsorOff(|theWin);|
|00003950| 0d 09 09 7d 0d 09 09 69 | 66 20 28 67 53 63 72 61 |...}...i|f (gScra|
|00003960| 70 43 6f 75 6e 74 20 21 | 3d 20 53 63 72 61 70 49 |pCount !|= ScrapI|
|00003970| 6e 66 6f 2e 73 63 72 61 | 70 43 6f 75 6e 74 29 20 |nfo.scra|pCount) |
|00003980| 7b 0d 09 09 09 45 64 69 | 74 43 68 75 6e 6b 09 2a |{....Edi|tChunk.*|
|00003990| 2a 6e 63 3b 0d 09 09 09 | 48 61 6e 64 6c 65 09 09 |*nc;....|Handle..|
|000039a0| 68 3b 0d 09 09 09 6c 6f | 6e 67 09 09 73 69 7a 65 |h;....lo|ng..size|
|000039b0| 2c 6f 66 66 73 65 74 3b | 0d 09 09 09 73 69 7a 65 |,offset;|....size|
|000039c0| 20 3d 20 47 65 74 53 63 | 72 61 70 28 4e 55 4c 4c | = GetSc|rap(NULL|
|000039d0| 2c 20 27 54 45 58 54 27 | 2c 20 26 6f 66 66 73 65 |, 'TEXT'|, &offse|
|000039e0| 74 29 3b 0d 09 09 09 69 | 66 20 28 73 69 7a 65 20 |t);....i|f (size |
|000039f0| 3e 20 30 29 20 7b 0d 09 | 09 09 09 6e 63 20 3d 20 |> 0) {..|...nc = |
|00003a00| 4e 65 77 43 68 75 6e 6b | 28 73 69 7a 65 2c 30 2c |NewChunk|(size,0,|
|00003a10| 30 2c 43 54 5f 55 6e 77 | 72 69 74 74 65 6e 29 3b |0,CT_Unw|ritten);|
|00003a20| 0d 09 09 09 09 69 66 20 | 28 6e 63 20 3d 3d 20 4e |.....if |(nc == N|
|00003a30| 55 4c 4c 29 0d 09 09 09 | 09 09 45 72 72 6f 72 41 |ULL)....|..ErrorA|
|00003a40| 6c 65 72 74 28 45 53 5f | 43 61 75 74 69 6f 6e 2c |lert(ES_|Caution,|
|00003a50| 22 4e 6f 74 20 65 6e 6f | 75 67 68 20 6d 65 6d 6f |"Not eno|ugh memo|
|00003a60| 72 79 20 66 6f 72 20 64 | 65 73 6b 74 6f 70 20 73 |ry for d|esktop s|
|00003a70| 63 72 61 70 22 29 3b 0d | 09 09 09 09 65 6c 73 65 |crap");.|....else|
|00003a80| 20 7b 0d 09 09 09 09 09 | 52 65 6c 65 61 73 65 45 | {......|ReleaseE|
|00003a90| 64 69 74 53 63 72 61 70 | 28 64 57 69 6e 2c 20 26 |ditScrap|(dWin, &|
|00003aa0| 67 53 63 72 61 70 43 68 | 75 6e 6b 29 3b 0d 09 09 |gScrapCh|unk);...|
|00003ab0| 09 09 09 67 53 63 72 61 | 70 43 68 75 6e 6b 20 3d |...gScra|pChunk =|
|00003ac0| 20 6e 63 3b 0d 09 09 09 | 09 09 47 65 74 53 63 72 | nc;....|..GetScr|
|00003ad0| 61 70 28 28 2a 67 53 63 | 72 61 70 43 68 75 6e 6b |ap((*gSc|rapChunk|
|00003ae0| 29 2d 3e 64 61 74 61 2c | 27 54 45 58 54 27 2c 26 |)->data,|'TEXT',&|
|00003af0| 6f 66 66 73 65 74 29 3b | 0d 09 09 09 09 09 28 2a |offset);|......(*|
|00003b00| 67 53 63 72 61 70 43 68 | 75 6e 6b 29 2d 3e 6c 61 |gScrapCh|unk)->la|
|00003b10| 73 74 43 74 72 20 3d 20 | 31 3b 09 2f 2f 20 46 6c |stCtr = |1;.// Fl|
|00003b20| 61 67 20 61 73 20 65 78 | 74 65 72 6e 61 6c 0d 09 |ag as ex|ternal..|
|00003b30| 09 09 09 7d 0d 09 09 09 | 7d 0d 09 09 09 67 53 63 |...}....|}....gSc|
|00003b40| 72 61 70 43 6f 75 6e 74 | 20 3d 20 53 63 72 61 70 |rapCount| = Scrap|
|00003b50| 49 6e 66 6f 2e 73 63 72 | 61 70 43 6f 75 6e 74 3b |Info.scr|apCount;|
|00003b60| 0d 09 09 7d 0d 09 7d 0d | 7d 0d 0d 0d 2f 2f 20 52 |...}..}.|}...// R|
|00003b70| 65 73 70 6f 6e 64 20 74 | 6f 20 61 20 6d 6f 75 73 |espond t|o a mous|
|00003b80| 65 2d 63 6c 69 63 6b 20 | 2d 20 68 69 67 68 6c 69 |e-click |- highli|
|00003b90| 67 68 74 20 63 65 6c 6c | 73 20 75 6e 74 69 6c 20 |ght cell|s until |
|00003ba0| 74 68 65 20 75 73 65 72 | 20 72 65 6c 65 61 73 65 |the user| release|
|00003bb0| 73 20 74 68 65 20 62 75 | 74 74 6f 6e 0d 2f 2f 0d |s the bu|tton.//.|
|00003bc0| 76 6f 69 64 20 4d 79 48 | 61 6e 64 6c 65 43 6c 69 |void MyH|andleCli|
|00003bd0| 63 6b 28 57 69 6e 64 6f | 77 50 74 72 20 74 68 65 |ck(Windo|wPtr the|
|00003be0| 57 69 6e 2c 20 50 6f 69 | 6e 74 20 77 68 65 72 65 |Win, Poi|nt where|
|00003bf0| 2c 20 45 76 65 6e 74 52 | 65 63 6f 72 64 20 2a 65 |, EventR|ecord *e|
|00003c00| 72 29 0d 7b 0d 09 50 6f | 69 6e 74 09 77 3b 0d 09 |r).{..Po|int.w;..|
|00003c10| 6c 6f 6e 67 09 70 6f 73 | 3b 0d 09 45 64 69 74 57 |long.pos|;..EditW|
|00003c20| 69 6e 64 6f 77 50 74 72 | 09 64 57 69 6e 20 3d 20 |indowPtr|.dWin = |
|00003c30| 28 45 64 69 74 57 69 6e | 64 6f 77 50 74 72 29 20 |(EditWin|dowPtr) |
|00003c40| 74 68 65 57 69 6e 3b 0d | 09 6c 6f 6e 67 09 61 6e |theWin;.|.long.an|
|00003c50| 63 68 6f 72 50 6f 73 20 | 3d 20 2d 31 2c 73 50 6f |chorPos |= -1,sPo|
|00003c60| 73 2c 65 50 6f 73 3b 0d | 0d 09 53 65 74 50 6f 72 |s,ePos;.|..SetPor|
|00003c70| 74 28 74 68 65 57 69 6e | 29 3b 0d 09 77 20 3d 20 |t(theWin|);..w = |
|00003c80| 77 68 65 72 65 3b 0d 09 | 47 6c 6f 62 61 6c 54 6f |where;..|GlobalTo|
|00003c90| 4c 6f 63 61 6c 28 26 77 | 29 3b 0d 09 69 66 20 28 |Local(&w|);..if (|
|00003ca0| 48 61 6e 64 6c 65 43 6f | 6e 74 72 6f 6c 43 6c 69 |HandleCo|ntrolCli|
|00003cb0| 63 6b 28 74 68 65 57 69 | 6e 2c 77 29 29 0d 09 09 |ck(theWi|n,w))...|
|00003cc0| 72 65 74 75 72 6e 3b 0d | 09 2f 2f 20 45 6c 73 65 |return;.|.// Else|
|00003cd0| 20 68 61 6e 64 6c 65 20 | 65 64 69 74 69 6e 67 20 | handle |editing |
|00003ce0| 63 68 6f 72 65 0d 09 43 | 75 72 73 6f 72 4f 66 66 |chore..C|ursorOff|
|00003cf0| 28 74 68 65 57 69 6e 29 | 3b 0d 09 69 66 20 28 77 |(theWin)|;..if (w|
|00003d00| 2e 76 20 3e 3d 20 48 65 | 61 64 65 72 48 65 69 67 |.v >= He|aderHeig|
|00003d10| 68 74 2b 54 6f 70 4d 61 | 72 67 69 6e 20 26 26 20 |ht+TopMa|rgin && |
|00003d20| 0d 09 09 77 2e 76 20 3c | 20 48 65 61 64 65 72 48 |...w.v <| HeaderH|
|00003d30| 65 69 67 68 74 2b 54 6f | 70 4d 61 72 67 69 6e 2b |eight+To|pMargin+|
|00003d40| 28 64 57 69 6e 2d 3e 6c | 69 6e 65 73 50 65 72 50 |(dWin->l|inesPerP|
|00003d50| 61 67 65 2a 4c 69 6e 65 | 48 65 69 67 68 74 29 29 |age*Line|Height))|
|00003d60| 0d 09 7b 0d 09 09 64 6f | 20 7b 0d 09 09 09 41 75 |..{...do| {....Au|
|00003d70| 74 6f 53 63 72 6f 6c 6c | 28 64 57 69 6e 2c 20 77 |toScroll|(dWin, w|
|00003d80| 29 3b 0d 0d 09 09 09 69 | 66 20 28 77 2e 68 20 3e |);.....i|f (w.h >|
|00003d90| 3d 20 41 64 64 72 50 6f | 73 2b 43 68 61 72 50 6f |= AddrPo|s+CharPo|
|00003da0| 73 28 48 65 78 53 74 61 | 72 74 29 20 26 26 0d 09 |s(HexSta|rt) &&..|
|00003db0| 09 09 09 77 2e 68 20 3c | 20 41 64 64 72 50 6f 73 |...w.h <| AddrPos|
|00003dc0| 2b 43 68 61 72 50 6f 73 | 28 48 65 78 53 74 61 72 |+CharPos|(HexStar|
|00003dd0| 74 29 2b 28 48 65 78 57 | 69 64 74 68 3c 3c 34 29 |t)+(HexW|idth<<4)|
|00003de0| 29 20 0d 09 09 09 7b 0d | 0d 09 09 09 09 70 6f 73 |) ....{.|.....pos|
|00003df0| 20 3d 20 28 28 77 2e 76 | 20 2d 20 28 48 65 61 64 | = ((w.v| - (Head|
|00003e00| 65 72 48 65 69 67 68 74 | 2b 54 6f 70 4d 61 72 67 |erHeight|+TopMarg|
|00003e10| 69 6e 29 29 2f 4c 69 6e | 65 48 65 69 67 68 74 29 |in))/Lin|eHeight)|
|00003e20| 2a 31 36 20 2b 0d 09 09 | 09 09 09 20 20 28 77 2e |*16 +...|... (w.|
|00003e30| 68 20 2d 20 28 41 64 64 | 72 50 6f 73 2b 43 68 61 |h - (Add|rPos+Cha|
|00003e40| 72 50 6f 73 28 48 65 78 | 53 74 61 72 74 29 29 2b |rPos(Hex|Start))+|
|00003e50| 31 32 29 20 2f 20 48 65 | 78 57 69 64 74 68 3b 0d |12) / He|xWidth;.|
|00003e60| 09 09 09 09 64 57 69 6e | 2d 3e 65 64 69 74 4d 6f |....dWin|->editMo|
|00003e70| 64 65 20 3d 20 45 4d 5f | 48 65 78 3b 0d 09 09 09 |de = EM_|Hex;....|
|00003e80| 7d 0d 09 09 09 65 6c 73 | 65 20 69 66 20 28 77 2e |}....els|e if (w.|
|00003e90| 68 20 3e 3d 20 41 64 64 | 72 50 6f 73 2b 43 68 61 |h >= Add|rPos+Cha|
|00003ea0| 72 50 6f 73 28 41 73 63 | 69 69 53 74 61 72 74 29 |rPos(Asc|iiStart)|
|00003eb0| 20 26 26 0d 09 09 09 09 | 09 20 77 2e 68 20 3c 20 | &&.....|. w.h < |
|00003ec0| 41 64 64 72 50 6f 73 2b | 43 68 61 72 50 6f 73 28 |AddrPos+|CharPos(|
|00003ed0| 41 73 63 69 69 53 74 61 | 72 74 29 2b 28 43 68 61 |AsciiSta|rt)+(Cha|
|00003ee0| 72 57 69 64 74 68 3c 3c | 34 29 29 0d 09 09 09 7b |rWidth<<|4))....{|
|00003ef0| 0d 09 09 09 09 70 6f 73 | 20 3d 20 28 28 77 2e 76 |.....pos| = ((w.v|
|00003f00| 20 2d 20 28 48 65 61 64 | 65 72 48 65 69 67 68 74 | - (Head|erHeight|
|00003f10| 2b 54 6f 70 4d 61 72 67 | 69 6e 29 29 2f 4c 69 6e |+TopMarg|in))/Lin|
|00003f20| 65 48 65 69 67 68 74 29 | 2a 31 36 20 2b 0d 09 09 |eHeight)|*16 +...|
|00003f30| 09 09 09 20 20 28 77 2e | 68 20 2d 20 28 41 64 64 |... (w.|h - (Add|
|00003f40| 72 50 6f 73 2b 43 68 61 | 72 50 6f 73 28 41 73 63 |rPos+Cha|rPos(Asc|
|00003f50| 69 69 53 74 61 72 74 29 | 29 2b 33 29 20 2f 20 43 |iiStart)|)+3) / C|
|00003f60| 68 61 72 57 69 64 74 68 | 3b 0d 09 09 09 09 64 57 |harWidth|;.....dW|
|00003f70| 69 6e 2d 3e 65 64 69 74 | 4d 6f 64 65 20 3d 20 45 |in->edit|Mode = E|
|00003f80| 4d 5f 41 73 63 69 69 3b | 0d 09 09 09 7d 0d 09 09 |M_Ascii;|....}...|
|00003f90| 09 65 6c 73 65 20 7b 0d | 09 09 09 09 67 6f 74 6f |.else {.|....goto|
|00003fa0| 20 47 65 74 4d 6f 75 73 | 65 4c 61 62 65 6c 3b 0d | GetMous|eLabel;.|
|00003fb0| 09 09 09 7d 0d 09 09 09 | 70 6f 73 20 2b 3d 20 64 |...}....|pos += d|
|00003fc0| 57 69 6e 2d 3e 65 64 69 | 74 4f 66 66 73 65 74 3b |Win->edi|tOffset;|
|00003fd0| 0d 09 09 09 69 66 20 28 | 70 6f 73 20 3c 20 64 57 |....if (|pos < dW|
|00003fe0| 69 6e 2d 3e 65 64 69 74 | 4f 66 66 73 65 74 29 0d |in->edit|Offset).|
|00003ff0| 09 09 09 09 70 6f 73 20 | 3d 20 64 57 69 6e 2d 3e |....pos |= dWin->|
|00004000| 65 64 69 74 4f 66 66 73 | 65 74 3b 0d 09 09 09 69 |editOffs|et;....i|
|00004010| 66 20 28 70 6f 73 20 3e | 20 64 57 69 6e 2d 3e 65 |f (pos >| dWin->e|
|00004020| 64 69 74 4f 66 66 73 65 | 74 2b 28 64 57 69 6e 2d |ditOffse|t+(dWin-|
|00004030| 3e 6c 69 6e 65 73 50 65 | 72 50 61 67 65 3c 3c 34 |>linesPe|rPage<<4|
|00004040| 29 29 0d 09 09 09 09 70 | 6f 73 20 3d 20 64 57 69 |)).....p|os = dWi|
|00004050| 6e 2d 3e 65 64 69 74 4f | 66 66 73 65 74 2b 28 64 |n->editO|ffset+(d|
|00004060| 57 69 6e 2d 3e 6c 69 6e | 65 73 50 65 72 50 61 67 |Win->lin|esPerPag|
|00004070| 65 3c 3c 34 29 3b 0d 09 | 09 09 69 66 20 28 70 6f |e<<4);..|..if (po|
|00004080| 73 20 3e 20 64 57 69 6e | 2d 3e 66 69 6c 65 53 69 |s > dWin|->fileSi|
|00004090| 7a 65 29 0d 09 09 09 09 | 70 6f 73 20 3d 20 64 57 |ze).....|pos = dW|
|000040a0| 69 6e 2d 3e 66 69 6c 65 | 53 69 7a 65 3b 0d 09 09 |in->file|Size;...|
|000040b0| 09 69 66 20 28 61 6e 63 | 68 6f 72 50 6f 73 20 3d |.if (anc|horPos =|
|000040c0| 3d 20 2d 31 29 20 7b 0d | 09 09 09 09 69 66 20 28 |= -1) {.|....if (|
|000040d0| 65 72 2d 3e 6d 6f 64 69 | 66 69 65 72 73 20 26 20 |er->modi|fiers & |
|000040e0| 73 68 69 66 74 4b 65 79 | 29 0d 09 09 09 09 09 61 |shiftKey|)......a|
|000040f0| 6e 63 68 6f 72 50 6f 73 | 20 3d 20 28 70 6f 73 20 |nchorPos| = (pos |
|00004100| 3c 20 64 57 69 6e 2d 3e | 73 74 61 72 74 53 65 6c |< dWin->|startSel|
|00004110| 29 3f 20 64 57 69 6e 2d | 3e 65 6e 64 53 65 6c 20 |)? dWin-|>endSel |
|00004120| 3a 20 64 57 69 6e 2d 3e | 73 74 61 72 74 53 65 6c |: dWin->|startSel|
|00004130| 3b 0d 09 09 09 09 65 6c | 73 65 0d 09 09 09 09 09 |;.....el|se......|
|00004140| 61 6e 63 68 6f 72 50 6f | 73 20 3d 20 70 6f 73 3b |anchorPo|s = pos;|
|00004150| 0d 09 09 09 7d 0d 09 09 | 09 73 50 6f 73 20 3d 20 |....}...|.sPos = |
|00004160| 70 6f 73 20 3c 20 61 6e | 63 68 6f 72 50 6f 73 3f |pos < an|chorPos?|
|00004170| 20 70 6f 73 20 3a 20 61 | 6e 63 68 6f 72 50 6f 73 | pos : a|nchorPos|
|00004180| 3b 0d 09 09 09 65 50 6f | 73 20 3d 20 70 6f 73 20 |;....ePo|s = pos |
|00004190| 3e 20 61 6e 63 68 6f 72 | 50 6f 73 3f 20 70 6f 73 |> anchor|Pos? pos|
|000041a0| 20 3a 20 61 6e 63 68 6f | 72 50 6f 73 3b 0d 09 09 | : ancho|rPos;...|
|000041b0| 09 69 66 20 28 65 50 6f | 73 20 3e 20 64 57 69 6e |.if (ePo|s > dWin|
|000041c0| 2d 3e 66 69 6c 65 53 69 | 7a 65 29 0d 09 09 09 09 |->fileSi|ze).....|
|000041d0| 65 50 6f 73 20 3d 20 64 | 57 69 6e 2d 3e 66 69 6c |ePos = d|Win->fil|
|000041e0| 65 53 69 7a 65 3b 0d 0d | 09 09 09 69 66 20 28 73 |eSize;..|...if (s|
|000041f0| 50 6f 73 20 21 3d 20 64 | 57 69 6e 2d 3e 73 74 61 |Pos != d|Win->sta|
|00004200| 72 74 53 65 6c 20 7c 7c | 0d 09 09 09 09 65 50 6f |rtSel |||.....ePo|
|00004210| 73 20 21 3d 20 64 57 69 | 6e 2d 3e 65 6e 64 53 65 |s != dWi|n->endSe|
|00004220| 6c 29 20 7b 0d 09 09 09 | 09 64 57 69 6e 2d 3e 73 |l) {....|.dWin->s|
|00004230| 74 61 72 74 53 65 6c 20 | 3d 20 73 50 6f 73 3b 0d |tartSel |= sPos;.|
|00004240| 09 09 09 09 64 57 69 6e | 2d 3e 65 6e 64 53 65 6c |....dWin|->endSel|
|00004250| 20 3d 20 65 50 6f 73 3b | 0d 09 09 09 09 55 70 64 | = ePos;|.....Upd|
|00004260| 61 74 65 4f 6e 73 63 72 | 65 65 6e 28 74 68 65 57 |ateOnscr|een(theW|
|00004270| 69 6e 29 3b 0d 09 09 09 | 7d 0d 0d 09 47 65 74 4d |in);....|}...GetM|
|00004280| 6f 75 73 65 4c 61 62 65 | 6c 3a 0d 09 09 09 47 65 |ouseLabe|l:....Ge|
|00004290| 74 4d 6f 75 73 65 28 26 | 77 29 3b 0d 09 09 7d 20 |tMouse(&|w);...} |
|000042a0| 77 68 69 6c 65 20 28 57 | 61 69 74 4d 6f 75 73 65 |while (W|aitMouse|
|000042b0| 55 70 28 29 29 3b 0d 09 | 7d 0d 7d 0d 0d 76 6f 69 |Up());..|}.}..voi|
|000042c0| 64 20 44 72 61 77 48 65 | 61 64 65 72 28 45 64 69 |d DrawHe|ader(Edi|
|000042d0| 74 57 69 6e 64 6f 77 50 | 74 72 20 64 57 69 6e 2c |tWindowP|tr dWin,|
|000042e0| 20 52 65 63 74 20 2a 72 | 29 0d 7b 0d 09 54 65 78 | Rect *r|).{..Tex|
|000042f0| 74 46 6f 6e 74 28 6d 6f | 6e 61 63 6f 29 3b 0d 09 |tFont(mo|naco);..|
|00004300| 54 65 78 74 53 69 7a 65 | 28 39 29 3b 0d 09 54 65 |TextSize|(9);..Te|
|00004310| 78 74 46 61 63 65 28 62 | 6f 6c 64 29 3b 0d 09 54 |xtFace(b|old);..T|
|00004320| 65 78 74 4d 6f 64 65 28 | 73 72 63 43 6f 70 79 29 |extMode(|srcCopy)|
|00004330| 3b 0d 0d 09 4d 6f 76 65 | 54 6f 28 72 2d 3e 6c 65 |;...Move|To(r->le|
|00004340| 66 74 2c 72 2d 3e 74 6f | 70 2b 48 65 61 64 65 72 |ft,r->to|p+Header|
|00004350| 48 65 69 67 68 74 2d 31 | 29 3b 0d 09 4c 69 6e 65 |Height-1|);..Line|
|00004360| 54 6f 28 72 2d 3e 72 69 | 67 68 74 2c 72 2d 3e 74 |To(r->ri|ght,r->t|
|00004370| 6f 70 2b 48 65 61 64 65 | 72 48 65 69 67 68 74 2d |op+Heade|rHeight-|
|00004380| 31 29 3b 0d 0d 09 4d 6f | 76 65 54 6f 28 32 30 2c |1);...Mo|veTo(20,|
|00004390| 20 72 2d 3e 74 6f 70 2b | 48 65 61 64 65 72 48 65 | r->top+|HeaderHe|
|000043a0| 69 67 68 74 2d 44 65 73 | 63 65 6e 64 48 65 69 67 |ight-Des|cendHeig|
|000043b0| 68 74 2d 32 29 3b 0d 09 | 69 66 20 28 67 50 72 65 |ht-2);..|if (gPre|
|000043c0| 66 73 2e 64 65 63 69 6d | 61 6c 41 64 64 72 29 0d |fs.decim|alAddr).|
|000043d0| 09 09 73 70 72 69 6e 74 | 66 28 67 42 75 66 66 65 |..sprint|f(gBuffe|
|000043e0| 72 2c 22 4c 65 6e 67 74 | 68 3a 20 25 37 6c 64 20 |r,"Lengt|h: %7ld |
|000043f0| 20 20 20 54 79 70 65 3a | 20 25 34 2e 34 73 20 20 | Type:| %4.4s |
|00004400| 20 20 43 72 65 61 74 6f | 72 3a 20 25 34 2e 34 73 | Creato|r: %4.4s|
|00004410| 20 20 20 20 46 6f 72 6b | 3a 20 25 73 22 2c 20 0d | Fork|: %s", .|
|00004420| 09 09 09 64 57 69 6e 2d | 3e 66 69 6c 65 53 69 7a |...dWin-|>fileSiz|
|00004430| 65 2c 26 64 57 69 6e 2d | 3e 66 69 6c 65 54 79 70 |e,&dWin-|>fileTyp|
|00004440| 65 2c 20 26 64 57 69 6e | 2d 3e 63 72 65 61 74 6f |e, &dWin|->creato|
|00004450| 72 2c 0d 09 09 09 28 28 | 64 57 69 6e 2d 3e 66 6f |r,....((|dWin->fo|
|00004460| 72 6b 20 3d 3d 20 46 54 | 5f 44 61 74 61 29 3f 20 |rk == FT|_Data)? |
|00004470| 22 64 61 74 61 22 20 3a | 20 22 72 73 72 63 22 29 |"data" :| "rsrc")|
|00004480| 29 3b 0d 09 65 6c 73 65 | 0d 09 09 73 70 72 69 6e |);..else|...sprin|
|00004490| 74 66 28 67 42 75 66 66 | 65 72 2c 22 4c 65 6e 67 |tf(gBuff|er,"Leng|
|000044a0| 74 68 3a 20 25 36 6c 58 | 68 20 20 20 20 54 79 70 |th: %6lX|h Typ|
|000044b0| 65 3a 20 25 34 2e 34 73 | 20 20 20 20 43 72 65 61 |e: %4.4s| Crea|
|000044c0| 74 6f 72 3a 20 25 34 2e | 34 73 20 20 20 20 46 6f |tor: %4.|4s Fo|
|000044d0| 72 6b 3a 20 25 73 22 2c | 20 0d 09 09 09 64 57 69 |rk: %s",| ....dWi|
|000044e0| 6e 2d 3e 66 69 6c 65 53 | 69 7a 65 2c 26 64 57 69 |n->fileS|ize,&dWi|
|000044f0| 6e 2d 3e 66 69 6c 65 54 | 79 70 65 2c 20 26 64 57 |n->fileT|ype, &dW|
|00004500| 69 6e 2d 3e 63 72 65 61 | 74 6f 72 2c 0d 09 09 09 |in->crea|tor,....|
|00004510| 28 28 64 57 69 6e 2d 3e | 66 6f 72 6b 20 3d 3d 20 |((dWin->|fork == |
|00004520| 46 54 5f 44 61 74 61 29 | 3f 20 22 64 61 74 61 22 |FT_Data)|? "data"|
|00004530| 20 3a 20 22 72 73 72 63 | 22 29 29 3b 0d 09 44 72 | : "rsrc|"));..Dr|
|00004540| 61 77 54 65 78 74 28 67 | 42 75 66 66 65 72 2c 30 |awText(g|Buffer,0|
|00004550| 2c 73 74 72 6c 65 6e 28 | 67 42 75 66 66 65 72 29 |,strlen(|gBuffer)|
|00004560| 29 3b 0d 7d 0d 0d 76 6f | 69 64 20 44 72 61 77 46 |);.}..vo|id DrawF|
|00004570| 6f 6f 74 65 72 28 45 64 | 69 74 57 69 6e 64 6f 77 |ooter(Ed|itWindow|
|00004580| 50 74 72 20 64 57 69 6e | 2c 20 52 65 63 74 20 2a |Ptr dWin|, Rect *|
|00004590| 72 2c 20 73 68 6f 72 74 | 20 70 61 67 65 4e 62 72 |r, short| pageNbr|
|000045a0| 2c 20 73 68 6f 72 74 20 | 6e 62 72 50 61 67 65 73 |, short |nbrPages|
|000045b0| 29 0d 7b 0d 09 75 6e 73 | 69 67 6e 65 64 20 6c 6f |).{..uns|igned lo|
|000045c0| 6e 67 09 74 69 6d 3b 0d | 09 44 61 74 65 54 69 6d |ng.tim;.|.DateTim|
|000045d0| 65 52 65 63 09 09 64 61 | 74 3b 0d 09 53 74 72 33 |eRec..da|t;..Str3|
|000045e0| 31 09 09 09 66 69 6c 65 | 4e 61 6d 65 3b 0d 0d 09 |1...file|Name;...|
|000045f0| 54 65 78 74 46 6f 6e 74 | 28 6d 6f 6e 61 63 6f 29 |TextFont|(monaco)|
|00004600| 3b 0d 09 54 65 78 74 53 | 69 7a 65 28 39 29 3b 0d |;..TextS|ize(9);.|
|00004610| 09 54 65 78 74 46 61 63 | 65 28 30 29 3b 0d 09 54 |.TextFac|e(0);..T|
|00004620| 65 78 74 4d 6f 64 65 28 | 73 72 63 43 6f 70 79 29 |extMode(|srcCopy)|
|00004630| 3b 0d 0d 09 47 65 74 44 | 61 74 65 54 69 6d 65 28 |;...GetD|ateTime(|
|00004640| 26 74 69 6d 29 3b 0d 09 | 53 65 63 73 32 44 61 74 |&tim);..|Secs2Dat|
|00004650| 65 28 74 69 6d 2c 26 64 | 61 74 29 3b 0d 0d 09 4d |e(tim,&d|at);...M|
|00004660| 6f 76 65 54 6f 28 72 2d | 3e 6c 65 66 74 2c 72 2d |oveTo(r-|>left,r-|
|00004670| 3e 74 6f 70 29 3b 0d 09 | 4c 69 6e 65 54 6f 28 72 |>top);..|LineTo(r|
|00004680| 2d 3e 72 69 67 68 74 2c | 72 2d 3e 74 6f 70 29 3b |->right,|r->top);|
|00004690| 0d 0d 09 73 70 72 69 6e | 74 66 28 67 42 75 66 66 |...sprin|tf(gBuff|
|000046a0| 65 72 2c 20 22 25 30 32 | 64 2f 25 30 32 64 2f 25 |er, "%02|d/%02d/%|
|000046b0| 30 32 64 20 25 30 32 64 | 3a 25 30 32 64 22 2c 0d |02d %02d|:%02d",.|
|000046c0| 09 09 64 61 74 2e 6d 6f | 6e 74 68 2c 64 61 74 2e |..dat.mo|nth,dat.|
|000046d0| 64 61 79 2c 64 61 74 2e | 79 65 61 72 2d 31 39 30 |day,dat.|year-190|
|000046e0| 30 2c 64 61 74 2e 68 6f | 75 72 2c 64 61 74 2e 6d |0,dat.ho|ur,dat.m|
|000046f0| 69 6e 75 74 65 29 3b 0d | 0d 09 4d 6f 76 65 54 6f |inute);.|..MoveTo|
|00004700| 28 32 30 2c 20 72 2d 3e | 74 6f 70 2b 46 6f 6f 74 |(20, r->|top+Foot|
|00004710| 65 72 48 65 69 67 68 74 | 2d 44 65 73 63 65 6e 64 |erHeight|-Descend|
|00004720| 48 65 69 67 68 74 2d 32 | 29 3b 0d 09 44 72 61 77 |Height-2|);..Draw|
|00004730| 54 65 78 74 28 67 42 75 | 66 66 65 72 2c 30 2c 73 |Text(gBu|ffer,0,s|
|00004740| 74 72 6c 65 6e 28 67 42 | 75 66 66 65 72 29 29 3b |trlen(gB|uffer));|
|00004750| 0d 0d 09 47 65 74 57 54 | 69 74 6c 65 28 28 57 69 |...GetWT|itle((Wi|
|00004760| 6e 64 6f 77 50 74 72 29 | 20 64 57 69 6e 2c 20 66 |ndowPtr)| dWin, f|
|00004770| 69 6c 65 4e 61 6d 65 29 | 3b 0d 09 73 70 72 69 6e |ileName)|;..sprin|
|00004780| 74 66 28 67 42 75 66 66 | 65 72 2c 22 46 69 6c 65 |tf(gBuff|er,"File|
|00004790| 3a 20 25 2e 2a 73 22 2c | 20 66 69 6c 65 4e 61 6d |: %.*s",| fileNam|
|000047a0| 65 5b 30 5d 2c 26 66 69 | 6c 65 4e 61 6d 65 5b 31 |e[0],&fi|leName[1|
|000047b0| 5d 29 3b 0d 09 4d 6f 76 | 65 54 6f 28 28 72 2d 3e |]);..Mov|eTo((r->|
|000047c0| 6c 65 66 74 2b 72 2d 3e | 72 69 67 68 74 29 2f 32 |left+r->|right)/2|
|000047d0| 20 2d 20 54 65 78 74 57 | 69 64 74 68 28 67 42 75 | - TextW|idth(gBu|
|000047e0| 66 66 65 72 2c 30 2c 73 | 74 72 6c 65 6e 28 67 42 |ffer,0,s|trlen(gB|
|000047f0| 75 66 66 65 72 29 29 2f | 32 2c 0d 09 20 09 09 72 |uffer))/|2,.. ..r|
|00004800| 2d 3e 74 6f 70 2b 46 6f | 6f 74 65 72 48 65 69 67 |->top+Fo|oterHeig|
|00004810| 68 74 2d 44 65 73 63 65 | 6e 64 48 65 69 67 68 74 |ht-Desce|ndHeight|
|00004820| 2d 32 29 3b 0d 09 44 72 | 61 77 54 65 78 74 28 67 |-2);..Dr|awText(g|
|00004830| 42 75 66 66 65 72 2c 30 | 2c 73 74 72 6c 65 6e 28 |Buffer,0|,strlen(|
|00004840| 67 42 75 66 66 65 72 29 | 29 3b 0d 09 0d 09 73 70 |gBuffer)|);....sp|
|00004850| 72 69 6e 74 66 28 67 42 | 75 66 66 65 72 2c 22 25 |rintf(gB|uffer,"%|
|00004860| 64 20 6f 66 20 25 64 22 | 2c 70 61 67 65 4e 62 72 |d of %d"|,pageNbr|
|00004870| 2c 6e 62 72 50 61 67 65 | 73 29 3b 0d 09 4d 6f 76 |,nbrPage|s);..Mov|
|00004880| 65 54 6f 28 72 2d 3e 72 | 69 67 68 74 20 2d 20 54 |eTo(r->r|ight - T|
|00004890| 65 78 74 57 69 64 74 68 | 28 67 42 75 66 66 65 72 |extWidth|(gBuffer|
|000048a0| 2c 30 2c 73 74 72 6c 65 | 6e 28 67 42 75 66 66 65 |,0,strle|n(gBuffe|
|000048b0| 72 29 29 20 2d 20 38 2c | 20 0d 09 09 09 72 2d 3e |r)) - 8,| ....r->|
|000048c0| 74 6f 70 2b 46 6f 6f 74 | 65 72 48 65 69 67 68 74 |top+Foot|erHeight|
|000048d0| 2d 44 65 73 63 65 6e 64 | 48 65 69 67 68 74 2d 32 |-Descend|Height-2|
|000048e0| 29 3b 0d 09 44 72 61 77 | 54 65 78 74 28 67 42 75 |);..Draw|Text(gBu|
|000048f0| 66 66 65 72 2c 30 2c 73 | 74 72 6c 65 6e 28 67 42 |ffer,0,s|trlen(gB|
|00004900| 75 66 66 65 72 29 29 3b | 0d 7d 0d 0d 76 6f 69 64 |uffer));|.}..void|
|00004910| 20 44 72 61 77 44 75 6d | 70 28 45 64 69 74 57 69 | DrawDum|p(EditWi|
|00004920| 6e 64 6f 77 50 74 72 20 | 64 57 69 6e 2c 20 52 65 |ndowPtr |dWin, Re|
|00004930| 63 74 20 2a 72 2c 20 6c | 6f 6e 67 20 73 41 64 64 |ct *r, l|ong sAdd|
|00004940| 72 2c 20 6c 6f 6e 67 20 | 65 41 64 64 72 29 0d 7b |r, long |eAddr).{|
|00004950| 0d 09 73 68 6f 72 74 09 | 79 3b 0d 09 73 68 6f 72 |..short.|y;..shor|
|00004960| 74 09 68 65 78 50 6f 73 | 3b 0d 09 73 68 6f 72 74 |t.hexPos|;..short|
|00004970| 09 61 73 63 69 69 50 6f | 73 3b 0d 09 72 65 67 69 |.asciiPo|s;..regi|
|00004980| 73 74 65 72 20 73 68 6f | 72 74 09 69 2c 63 68 2c |ster sho|rt.i,ch,|
|00004990| 63 68 31 2c 63 68 32 3b | 0d 09 6c 6f 6e 67 09 61 |ch1,ch2;|..long.a|
|000049a0| 64 64 72 3b 0d 09 54 65 | 78 74 46 6f 6e 74 28 6d |ddr;..Te|xtFont(m|
|000049b0| 6f 6e 61 63 6f 29 3b 0d | 09 54 65 78 74 53 69 7a |onaco);.|.TextSiz|
|000049c0| 65 28 39 29 3b 0d 09 54 | 65 78 74 46 61 63 65 28 |e(9);..T|extFace(|
|000049d0| 30 29 3b 0d 09 54 65 78 | 74 4d 6f 64 65 28 73 72 |0);..Tex|tMode(sr|
|000049e0| 63 43 6f 70 79 29 3b 0d | 0d 09 61 64 64 72 20 3d |cCopy);.|..addr =|
|000049f0| 20 73 41 64 64 72 20 2d | 20 28 73 41 64 64 72 20 | sAddr -| (sAddr |
|00004a00| 25 20 31 36 29 3b 0d 09 | 66 6f 72 20 28 79 20 3d |% 16);..|for (y =|
|00004a10| 20 72 2d 3e 74 6f 70 3b | 20 79 20 3c 20 72 2d 3e | r->top;| y < r->|
|00004a20| 62 6f 74 74 6f 6d 20 26 | 26 20 61 64 64 72 20 3c |bottom &|& addr <|
|00004a30| 20 65 41 64 64 72 3b 20 | 79 20 2b 3d 20 4c 69 6e | eAddr; |y += Lin|
|00004a40| 65 48 65 69 67 68 74 29 | 20 7b 0d 09 09 4d 6f 76 |eHeight)| {...Mov|
|00004a50| 65 54 6f 28 41 64 64 72 | 50 6f 73 2c 79 29 3b 0d |eTo(Addr|Pos,y);.|
|00004a60| 09 09 69 66 20 28 67 50 | 72 65 66 73 2e 64 65 63 |..if (gP|refs.dec|
|00004a70| 69 6d 61 6c 41 64 64 72 | 29 0d 09 09 09 73 70 72 |imalAddr|)....spr|
|00004a80| 69 6e 74 66 28 67 42 75 | 66 66 65 72 2c 22 25 37 |intf(gBu|ffer,"%7|
|00004a90| 6c 64 3a 20 22 2c 20 61 | 64 64 72 29 3b 0d 09 09 |ld: ", a|ddr);...|
|00004aa0| 65 6c 73 65 0d 09 09 09 | 73 70 72 69 6e 74 66 28 |else....|sprintf(|
|00004ab0| 67 42 75 66 66 65 72 2c | 22 25 30 36 6c 58 3a 20 |gBuffer,|"%06lX: |
|00004ac0| 20 22 2c 20 61 64 64 72 | 29 3b 0d 09 09 68 65 78 | ", addr|);...hex|
|00004ad0| 50 6f 73 20 3d 20 48 65 | 78 53 74 61 72 74 3b 0d |Pos = He|xStart;.|
|00004ae0| 09 09 61 73 63 69 69 50 | 6f 73 20 3d 20 41 73 63 |..asciiP|os = Asc|
|00004af0| 69 69 53 74 61 72 74 3b | 0d 09 09 66 6f 72 20 28 |iiStart;|...for (|
|00004b00| 69 20 3d 20 31 36 3b 20 | 69 3b 20 2d 2d 69 2c 2b |i = 16; |i; --i,+|
|00004b10| 2b 61 64 64 72 29 20 7b | 0d 09 09 09 69 66 20 28 |+addr) {|....if (|
|00004b20| 61 64 64 72 20 3e 3d 20 | 73 41 64 64 72 20 26 26 |addr >= |sAddr &&|
|00004b30| 20 61 64 64 72 20 3c 20 | 65 41 64 64 72 29 20 7b | addr < |eAddr) {|
|00004b40| 0d 09 09 09 09 63 68 20 | 3d 20 47 65 74 42 79 74 |.....ch |= GetByt|
|00004b50| 65 28 64 57 69 6e 2c 20 | 61 64 64 72 29 3b 0d 09 |e(dWin, |addr);..|
|00004b60| 09 09 09 63 68 31 20 3d | 20 63 68 32 20 3d 20 63 |...ch1 =| ch2 = c|
|00004b70| 68 3b 0d 09 09 09 09 63 | 68 31 20 3e 3e 3d 20 34 |h;.....c|h1 >>= 4|
|00004b80| 3b 0d 09 09 09 09 63 68 | 32 20 26 3d 20 30 78 30 |;.....ch|2 &= 0x0|
|00004b90| 46 3b 0d 09 09 09 09 67 | 42 75 66 66 65 72 5b 68 |F;.....g|Buffer[h|
|00004ba0| 65 78 50 6f 73 2b 2b 5d | 20 3d 20 63 68 31 20 2b |exPos++]| = ch1 +|
|00004bb0| 20 28 28 63 68 31 20 3c | 20 31 30 29 3f 20 27 30 | ((ch1 <| 10)? '0|
|00004bc0| 27 20 3a 20 28 27 41 27 | 2d 31 30 29 29 3b 0d 09 |' : ('A'|-10));..|
|00004bd0| 09 09 09 67 42 75 66 66 | 65 72 5b 68 65 78 50 6f |...gBuff|er[hexPo|
|00004be0| 73 2b 2b 5d 20 3d 20 63 | 68 32 20 2b 20 28 28 63 |s++] = c|h2 + ((c|
|00004bf0| 68 32 20 3c 20 31 30 29 | 3f 20 27 30 27 20 3a 20 |h2 < 10)|? '0' : |
|00004c00| 28 27 41 27 2d 31 30 29 | 29 3b 0d 09 09 09 09 67 |('A'-10)|);.....g|
|00004c10| 42 75 66 66 65 72 5b 68 | 65 78 50 6f 73 2b 2b 5d |Buffer[h|exPos++]|
|00004c20| 20 3d 20 27 20 27 3b 0d | 09 09 09 09 67 42 75 66 | = ' ';.|....gBuf|
|00004c30| 66 65 72 5b 61 73 63 69 | 69 50 6f 73 2b 2b 5d 20 |fer[asci|iPos++] |
|00004c40| 3d 20 28 28 63 68 20 3e | 3d 20 27 20 27 20 26 26 |= ((ch >|= ' ' &&|
|00004c50| 20 63 68 20 3c 3d 20 67 | 48 69 67 68 43 68 61 72 | ch <= g|HighChar|
|00004c60| 29 3f 20 63 68 20 3a 20 | 27 2e 27 29 3b 0d 09 09 |)? ch : |'.');...|
|00004c70| 09 7d 0d 09 09 09 65 6c | 73 65 20 7b 0d 09 09 09 |.}....el|se {....|
|00004c80| 09 67 42 75 66 66 65 72 | 5b 68 65 78 50 6f 73 2b |.gBuffer|[hexPos+|
|00004c90| 2b 5d 20 3d 20 27 20 27 | 3b 0d 09 09 09 09 67 42 |+] = ' '|;.....gB|
|00004ca0| 75 66 66 65 72 5b 68 65 | 78 50 6f 73 2b 2b 5d 20 |uffer[he|xPos++] |
|00004cb0| 3d 20 27 20 27 3b 0d 09 | 09 09 09 67 42 75 66 66 |= ' ';..|...gBuff|
|00004cc0| 65 72 5b 68 65 78 50 6f | 73 2b 2b 5d 20 3d 20 27 |er[hexPo|s++] = '|
|00004cd0| 20 27 3b 0d 09 09 09 09 | 67 42 75 66 66 65 72 5b | ';.....|gBuffer[|
|00004ce0| 61 73 63 69 69 50 6f 73 | 2b 2b 5d 20 3d 20 27 20 |asciiPos|++] = ' |
|00004cf0| 27 3b 0d 09 09 09 7d 0d | 09 09 7d 0d 09 09 67 42 |';....}.|..}...gB|
|00004d00| 75 66 66 65 72 5b 35 37 | 5d 20 3d 20 27 20 27 3b |uffer[57|] = ' ';|
|00004d10| 0d 09 09 67 42 75 66 66 | 65 72 5b 35 38 5d 20 3d |...gBuff|er[58] =|
|00004d20| 20 27 20 27 3b 0d 09 09 | 4d 6f 76 65 54 6f 28 41 | ' ';...|MoveTo(A|
|00004d30| 64 64 72 50 6f 73 2c 79 | 29 3b 0d 09 09 44 72 61 |ddrPos,y|);...Dra|
|00004d40| 77 54 65 78 74 28 67 42 | 75 66 66 65 72 2c 30 2c |wText(gB|uffer,0,|
|00004d50| 37 35 29 3b 0d 09 7d 0d | 7d 0d 0d 76 6f 69 64 20 |75);..}.|}..void |
|00004d60| 44 72 61 77 50 61 67 65 | 28 45 64 69 74 57 69 6e |DrawPage|(EditWin|
|00004d70| 64 6f 77 50 74 72 20 64 | 57 69 6e 29 0d 7b 0d 09 |dowPtr d|Win).{..|
|00004d80| 47 72 61 66 50 74 72 09 | 09 09 73 61 76 65 50 6f |GrafPtr.|..savePo|
|00004d90| 72 74 3b 0d 09 52 65 63 | 74 09 09 09 72 3b 0d 09 |rt;..Rec|t...r;..|
|00004da0| 42 69 74 4d 61 70 09 09 | 09 72 65 61 6c 42 69 74 |BitMap..|.realBit|
|00004db0| 73 3b 0d 0d 23 69 66 20 | 50 52 4f 46 49 4c 45 0d |s;..#if |PROFILE.|
|00004dc0| 09 5f 70 72 6f 66 69 6c | 65 20 3d 20 31 3b 0d 23 |._profil|e = 1;.#|
|00004dd0| 65 6e 64 69 66 0d 09 47 | 65 74 50 6f 72 74 28 26 |endif..G|etPort(&|
|00004de0| 73 61 76 65 50 6f 72 74 | 29 3b 0d 09 53 65 74 50 |savePort|);..SetP|
|00004df0| 6f 72 74 28 28 47 72 61 | 66 50 74 72 29 20 64 57 |ort((Gra|fPtr) dW|
|00004e00| 69 6e 29 3b 0d 0d 09 72 | 65 61 6c 42 69 74 73 20 |in);...r|ealBits |
|00004e10| 3d 20 28 28 47 72 61 66 | 50 74 72 29 20 64 57 69 |= ((Graf|Ptr) dWi|
|00004e20| 6e 29 2d 3e 70 6f 72 74 | 42 69 74 73 3b 0d 09 53 |n)->port|Bits;..S|
|00004e30| 65 74 50 6f 72 74 42 69 | 74 73 28 26 67 42 69 74 |etPortBi|ts(&gBit|
|00004e40| 4d 61 70 29 3b 0d 0d 09 | 72 20 3d 20 28 28 57 69 |Map);...|r = ((Wi|
|00004e50| 6e 64 6f 77 50 74 72 29 | 20 64 57 69 6e 29 2d 3e |ndowPtr)| dWin)->|
|00004e60| 70 6f 72 74 52 65 63 74 | 3b 0d 09 72 2e 72 69 67 |portRect|;..r.rig|
|00004e70| 68 74 20 2d 3d 20 28 53 | 42 61 72 53 69 7a 65 20 |ht -= (S|BarSize |
|00004e80| 2d 20 31 29 3b 0d 2f 2f | 09 72 2e 62 6f 74 74 6f |- 1);.//|.r.botto|
|00004e90| 6d 20 2d 3d 20 28 53 42 | 61 72 53 69 7a 65 20 2d |m -= (SB|arSize -|
|00004ea0| 20 31 29 3b 0d 0d 09 69 | 66 20 28 72 2e 72 69 67 | 1);...i|f (r.rig|
|00004eb0| 68 74 20 2d 20 72 2e 6c | 65 66 74 20 3e 20 67 42 |ht - r.l|eft > gB|
|00004ec0| 69 74 4d 61 70 2e 62 6f | 75 6e 64 73 2e 72 69 67 |itMap.bo|unds.rig|
|00004ed0| 68 74 20 2d 20 67 42 69 | 74 4d 61 70 2e 62 6f 75 |ht - gBi|tMap.bou|
|00004ee0| 6e 64 73 2e 6c 65 66 74 | 20 7c 7c 0d 09 09 72 2e |nds.left| ||...r.|
|00004ef0| 62 6f 74 74 6f 6d 20 2d | 20 72 2e 74 6f 70 20 3e |bottom -| r.top >|
|00004f00| 20 67 42 69 74 4d 61 70 | 2e 62 6f 75 6e 64 73 2e | gBitMap|.bounds.|
|00004f10| 62 6f 74 74 6f 6d 20 2d | 20 67 42 69 74 4d 61 70 |bottom -| gBitMap|
|00004f20| 2e 62 6f 75 6e 64 73 2e | 74 6f 70 29 0d 09 09 44 |.bounds.|top)...D|
|00004f30| 65 62 75 67 53 74 72 28 | 22 5c 70 4f 79 21 22 29 |ebugStr(|"\pOy!")|
|00004f40| 3b 0d 0d 09 45 72 61 73 | 65 52 65 63 74 28 26 72 |;...Eras|eRect(&r|
|00004f50| 29 3b 0d 0d 09 44 72 61 | 77 48 65 61 64 65 72 28 |);...Dra|wHeader(|
|00004f60| 64 57 69 6e 2c 20 26 72 | 29 3b 0d 0d 09 72 2e 74 |dWin, &r|);...r.t|
|00004f70| 6f 70 20 2b 3d 20 28 48 | 65 61 64 65 72 48 65 69 |op += (H|eaderHei|
|00004f80| 67 68 74 2b 54 6f 70 4d | 61 72 67 69 6e 2b 4c 69 |ght+TopM|argin+Li|
|00004f90| 6e 65 48 65 69 67 68 74 | 2d 44 65 73 63 65 6e 64 |neHeight|-Descend|
|00004fa0| 48 65 69 67 68 74 29 3b | 0d 09 72 2e 62 6f 74 74 |Height);|..r.bott|
|00004fb0| 6f 6d 20 2d 3d 20 28 53 | 42 61 72 53 69 7a 65 2b |om -= (S|BarSize+|
|00004fc0| 44 65 73 63 65 6e 64 48 | 65 69 67 68 74 2b 42 6f |DescendH|eight+Bo|
|00004fd0| 74 4d 61 72 67 69 6e 29 | 3b 0d 0d 09 44 72 61 77 |tMargin)|;...Draw|
|00004fe0| 44 75 6d 70 28 64 57 69 | 6e 2c 20 26 72 2c 20 64 |Dump(dWi|n, &r, d|
|00004ff0| 57 69 6e 2d 3e 65 64 69 | 74 4f 66 66 73 65 74 2c |Win->edi|tOffset,|
|00005000| 20 64 57 69 6e 2d 3e 66 | 69 6c 65 53 69 7a 65 29 | dWin->f|ileSize)|
|00005010| 3b 0d 0d 09 2f 2f 20 69 | 66 20 28 64 57 69 6e 2d |;...// i|f (dWin-|
|00005020| 3e 65 6e 64 53 65 6c 20 | 3e 20 64 57 69 6e 2d 3e |>endSel |> dWin->|
|00005030| 73 74 61 72 74 53 65 6c | 20 26 26 20 0d 09 2f 2f |startSel| && ..//|
|00005040| 09 64 57 69 6e 2d 3e 65 | 6e 64 53 65 6c 20 3e 3d |.dWin->e|ndSel >=|
|00005050| 20 64 57 69 6e 2d 3e 65 | 64 69 74 4f 66 66 73 65 | dWin->e|ditOffse|
|00005060| 74 20 26 26 0d 09 2f 2f | 09 64 57 69 6e 2d 3e 73 |t &&..//|.dWin->s|
|00005070| 74 61 72 74 53 65 6c 20 | 3c 20 64 57 69 6e 2d 3e |tartSel |< dWin->|
|00005080| 65 64 69 74 4f 66 66 73 | 65 74 2b 28 64 57 69 6e |editOffs|et+(dWin|
|00005090| 2d 3e 6c 69 6e 65 73 50 | 65 72 50 61 67 65 3c 3c |->linesP|erPage<<|
|000050a0| 34 29 29 20 0d 09 2f 2f | 09 49 6e 76 65 72 74 53 |4)) ..//|.InvertS|
|000050b0| 65 6c 65 63 74 69 6f 6e | 28 64 57 69 6e 29 3b 0d |election|(dWin);.|
|000050c0| 0d 09 53 65 74 50 6f 72 | 74 42 69 74 73 28 26 72 |..SetPor|tBits(&r|
|000050d0| 65 61 6c 42 69 74 73 29 | 3b 0d 09 53 65 74 50 6f |ealBits)|;..SetPo|
|000050e0| 72 74 28 73 61 76 65 50 | 6f 72 74 29 3b 0d 0d 23 |rt(saveP|ort);..#|
|000050f0| 69 66 20 50 52 4f 46 49 | 4c 45 0d 09 5f 70 72 6f |if PROFI|LE.._pro|
|00005100| 66 69 6c 65 20 3d 20 30 | 3b 0d 23 65 6e 64 69 66 |file = 0|;.#endif|
|00005110| 0d 7d 0d 0d 76 6f 69 64 | 20 49 6e 76 65 72 74 53 |.}..void| InvertS|
|00005120| 65 6c 65 63 74 69 6f 6e | 28 45 64 69 74 57 69 6e |election|(EditWin|
|00005130| 64 6f 77 50 74 72 09 64 | 57 69 6e 29 0d 7b 0d 09 |dowPtr.d|Win).{..|
|00005140| 2f 2f 20 49 6e 76 65 72 | 74 20 53 65 6c 65 63 74 |// Inver|t Select|
|00005150| 69 6f 6e 0d 09 52 65 63 | 74 09 72 3b 0d 09 6c 6f |ion..Rec|t.r;..lo|
|00005160| 6e 67 09 78 3b 0d 09 6c | 6f 6e 67 09 73 74 61 72 |ng.x;..l|ong.star|
|00005170| 74 2c 65 6e 64 3b 0d 09 | 73 68 6f 72 74 09 73 74 |t,end;..|short.st|
|00005180| 61 72 74 58 2c 65 6e 64 | 58 3b 0d 09 42 6f 6f 6c |artX,end|X;..Bool|
|00005190| 65 61 6e 09 66 72 6f 6e | 74 46 6c 61 67 3b 0d 0d |ean.fron|tFlag;..|
|000051a0| 09 66 72 6f 6e 74 46 6c | 61 67 20 3d 20 28 28 57 |.frontFl|ag = ((W|
|000051b0| 69 6e 64 6f 77 50 74 72 | 29 20 64 57 69 6e 20 3d |indowPtr|) dWin =|
|000051c0| 3d 20 46 72 6f 6e 74 57 | 69 6e 64 6f 77 28 29 20 |= FrontW|indow() |
|000051d0| 26 26 0d 09 09 09 09 20 | 64 57 69 6e 2d 3e 6f 57 |&&..... |dWin->oW|
|000051e0| 69 6e 2e 61 63 74 69 76 | 65 29 3b 0d 0d 09 69 66 |in.activ|e);...if|
|000051f0| 20 28 64 57 69 6e 2d 3e | 65 6e 64 53 65 6c 20 3c | (dWin->|endSel <|
|00005200| 3d 20 64 57 69 6e 2d 3e | 73 74 61 72 74 53 65 6c |= dWin->|startSel|
|00005210| 29 0d 09 09 72 65 74 75 | 72 6e 3b 0d 0d 09 73 74 |)...retu|rn;...st|
|00005220| 61 72 74 20 3d 20 64 57 | 69 6e 2d 3e 73 74 61 72 |art = dW|in->star|
|00005230| 74 53 65 6c 20 2d 20 64 | 57 69 6e 2d 3e 65 64 69 |tSel - d|Win->edi|
|00005240| 74 4f 66 66 73 65 74 3b | 0d 09 69 66 20 28 73 74 |tOffset;|..if (st|
|00005250| 61 72 74 20 3c 20 30 29 | 0d 09 09 73 74 61 72 74 |art < 0)|...start|
|00005260| 20 3d 20 30 3b 0d 09 65 | 6e 64 20 3d 20 28 64 57 | = 0;..e|nd = (dW|
|00005270| 69 6e 2d 3e 65 6e 64 53 | 65 6c 2d 31 29 20 2d 20 |in->endS|el-1) - |
|00005280| 64 57 69 6e 2d 3e 65 64 | 69 74 4f 66 66 73 65 74 |dWin->ed|itOffset|
|00005290| 3b 0d 09 69 66 20 28 65 | 6e 64 20 3e 20 28 64 57 |;..if (e|nd > (dW|
|000052a0| 69 6e 2d 3e 6c 69 6e 65 | 73 50 65 72 50 61 67 65 |in->line|sPerPage|
|000052b0| 3c 3c 34 29 2d 31 29 0d | 09 09 65 6e 64 20 3d 20 |<<4)-1).|..end = |
|000052c0| 28 64 57 69 6e 2d 3e 6c | 69 6e 65 73 50 65 72 50 |(dWin->l|inesPerP|
|000052d0| 61 67 65 3c 3c 34 29 2d | 31 3b 0d 0d 09 50 65 6e |age<<4)-|1;...Pen|
|000052e0| 4d 6f 64 65 28 70 61 74 | 58 6f 72 29 3b 0d 09 0d |Mode(pat|Xor);...|
|000052f0| 09 73 74 61 72 74 58 20 | 3d 20 43 6f 6c 4e 62 72 |.startX |= ColNbr|
|00005300| 28 73 74 61 72 74 29 3b | 0d 09 65 6e 64 58 20 3d |(start);|..endX =|
|00005310| 20 43 6f 6c 4e 62 72 28 | 65 6e 64 29 3b 0d 0d 09 | ColNbr(|end);...|
|00005320| 69 66 20 28 21 66 72 6f | 6e 74 46 6c 61 67 29 20 |if (!fro|ntFlag) |
|00005330| 7b 0d 09 09 69 66 20 28 | 4c 69 6e 65 4e 62 72 28 |{...if (|LineNbr(|
|00005340| 73 74 61 72 74 29 20 3c | 20 4c 69 6e 65 4e 62 72 |start) <| LineNbr|
|00005350| 28 65 6e 64 29 29 20 7b | 0d 09 09 09 2f 2f 20 49 |(end)) {|....// I|
|00005360| 6e 76 65 72 74 20 48 65 | 78 0d 09 09 09 72 2e 74 |nvert He|x....r.t|
|00005370| 6f 70 20 3d 20 48 65 61 | 64 65 72 48 65 69 67 68 |op = Hea|derHeigh|
|00005380| 74 2b 54 6f 70 4d 61 72 | 67 69 6e 2b 4c 69 6e 65 |t+TopMar|gin+Line|
|00005390| 4e 62 72 28 73 74 61 72 | 74 29 2a 4c 69 6e 65 48 |Nbr(star|t)*LineH|
|000053a0| 65 69 67 68 74 3b 0d 09 | 09 09 72 2e 62 6f 74 74 |eight;..|..r.bott|
|000053b0| 6f 6d 20 3d 20 72 2e 74 | 6f 70 2b 4c 69 6e 65 48 |om = r.t|op+LineH|
|000053c0| 65 69 67 68 74 3b 0d 09 | 09 09 72 2e 6c 65 66 74 |eight;..|..r.left|
|000053d0| 20 3d 20 41 64 64 72 50 | 6f 73 2b 43 68 61 72 50 | = AddrP|os+CharP|
|000053e0| 6f 73 28 48 65 78 53 74 | 61 72 74 29 2b 48 65 78 |os(HexSt|art)+Hex|
|000053f0| 50 6f 73 28 73 74 61 72 | 74 58 29 2d 33 3b 0d 09 |Pos(star|tX)-3;..|
|00005400| 09 09 72 2e 72 69 67 68 | 74 20 3d 20 41 64 64 72 |..r.righ|t = Addr|
|00005410| 50 6f 73 2b 43 68 61 72 | 50 6f 73 28 48 65 78 53 |Pos+Char|Pos(HexS|
|00005420| 74 61 72 74 29 2b 48 65 | 78 50 6f 73 28 31 36 29 |tart)+He|xPos(16)|
|00005430| 2d 33 3b 0d 0d 09 09 09 | 4d 6f 76 65 54 6f 28 41 |-3;.....|MoveTo(A|
|00005440| 64 64 72 50 6f 73 2b 43 | 68 61 72 50 6f 73 28 48 |ddrPos+C|harPos(H|
|00005450| 65 78 53 74 61 72 74 29 | 2d 33 2c 72 2e 62 6f 74 |exStart)|-3,r.bot|
|00005460| 74 6f 6d 29 3b 0d 09 09 | 09 69 66 20 28 67 43 6f |tom);...|.if (gCo|
|00005470| 6c 6f 72 51 44 46 6c 61 | 67 29 0d 09 09 09 09 48 |lorQDFla|g).....H|
|00005480| 69 6c 69 74 65 4d 6f 64 | 65 20 26 3d 20 7e 28 31 |iliteMod|e &= ~(1|
|00005490| 20 3c 3c 20 68 69 6c 69 | 74 65 42 69 74 29 3b 09 | << hili|teBit);.|
|000054a0| 2f 2f 20 48 69 6c 69 74 | 65 20 75 73 69 6e 67 20 |// Hilit|e using |
|000054b0| 48 69 6c 69 74 65 20 43 | 6f 6c 6f 72 0d 09 09 09 |Hilite C|olor....|
|000054c0| 4c 69 6e 65 54 6f 28 72 | 2e 6c 65 66 74 2c 72 2e |LineTo(r|.left,r.|
|000054d0| 62 6f 74 74 6f 6d 29 3b | 0d 09 09 09 69 66 20 28 |bottom);|....if (|
|000054e0| 67 43 6f 6c 6f 72 51 44 | 46 6c 61 67 29 0d 09 09 |gColorQD|Flag)...|
|000054f0| 09 09 48 69 6c 69 74 65 | 4d 6f 64 65 20 26 3d 20 |..Hilite|Mode &= |
|00005500| 7e 28 31 20 3c 3c 20 68 | 69 6c 69 74 65 42 69 74 |~(1 << h|iliteBit|
|00005510| 29 3b 09 2f 2f 20 48 69 | 6c 69 74 65 20 75 73 69 |);.// Hi|lite usi|
|00005520| 6e 67 20 48 69 6c 69 74 | 65 20 43 6f 6c 6f 72 0d |ng Hilit|e Color.|
|00005530| 09 09 09 4c 69 6e 65 54 | 6f 28 72 2e 6c 65 66 74 |...LineT|o(r.left|
|00005540| 2c 72 2e 74 6f 70 29 3b | 0d 09 09 09 69 66 20 28 |,r.top);|....if (|
|00005550| 64 57 69 6e 2d 3e 73 74 | 61 72 74 53 65 6c 20 3e |dWin->st|artSel >|
|00005560| 3d 20 64 57 69 6e 2d 3e | 65 64 69 74 4f 66 66 73 |= dWin->|editOffs|
|00005570| 65 74 29 20 7b 0d 09 09 | 09 09 69 66 20 28 67 43 |et) {...|..if (gC|
|00005580| 6f 6c 6f 72 51 44 46 6c | 61 67 29 0d 09 09 09 09 |olorQDFl|ag).....|
|00005590| 48 69 6c 69 74 65 4d 6f | 64 65 20 26 3d 20 7e 28 |HiliteMo|de &= ~(|
|000055a0| 31 20 3c 3c 20 68 69 6c | 69 74 65 42 69 74 29 3b |1 << hil|iteBit);|
|000055b0| 09 2f 2f 20 48 69 6c 69 | 74 65 20 75 73 69 6e 67 |.// Hili|te using|
|000055c0| 20 48 69 6c 69 74 65 20 | 43 6f 6c 6f 72 0d 09 09 | Hilite |Color...|
|000055d0| 09 09 4c 69 6e 65 54 6f | 28 72 2e 72 69 67 68 74 |..LineTo|(r.right|
|000055e0| 2c 72 2e 74 6f 70 29 3b | 0d 09 09 09 7d 0d 09 09 |,r.top);|....}...|
|000055f0| 09 65 6c 73 65 0d 09 09 | 09 09 4d 6f 76 65 54 6f |.else...|..MoveTo|
|00005600| 28 72 2e 72 69 67 68 74 | 2c 72 2e 74 6f 70 29 3b |(r.right|,r.top);|
|00005610| 0d 09 09 09 69 66 20 28 | 67 43 6f 6c 6f 72 51 44 |....if (|gColorQD|
|00005620| 46 6c 61 67 29 0d 09 09 | 09 09 48 69 6c 69 74 65 |Flag)...|..Hilite|
|00005630| 4d 6f 64 65 20 26 3d 20 | 7e 28 31 20 3c 3c 20 68 |Mode &= |~(1 << h|
|00005640| 69 6c 69 74 65 42 69 74 | 29 3b 09 2f 2f 20 48 69 |iliteBit|);.// Hi|
|00005650| 6c 69 74 65 20 75 73 69 | 6e 67 20 48 69 6c 69 74 |lite usi|ng Hilit|
|00005660| 65 20 43 6f 6c 6f 72 0d | 09 09 09 4c 69 6e 65 54 |e Color.|...LineT|
|00005670| 6f 28 72 2e 72 69 67 68 | 74 2c 72 2e 62 6f 74 74 |o(r.righ|t,r.bott|
|00005680| 6f 6d 29 3b 0d 0d 09 09 | 09 2f 2f 20 4f 75 74 6c |om);....|.// Outl|
|00005690| 69 6e 65 20 42 6f 78 20 | 61 72 6f 75 6e 64 20 41 |ine Box |around A|
|000056a0| 73 63 69 69 0d 09 09 09 | 72 2e 6c 65 66 74 20 3d |scii....|r.left =|
|000056b0| 20 41 64 64 72 50 6f 73 | 2b 43 68 61 72 50 6f 73 | AddrPos|+CharPos|
|000056c0| 28 41 73 63 69 69 53 74 | 61 72 74 29 2b 43 68 61 |(AsciiSt|art)+Cha|
|000056d0| 72 50 6f 73 28 73 74 61 | 72 74 58 29 2d 31 3b 0d |rPos(sta|rtX)-1;.|
|000056e0| 09 09 09 72 2e 72 69 67 | 68 74 20 3d 20 41 64 64 |...r.rig|ht = Add|
|000056f0| 72 50 6f 73 2b 43 68 61 | 72 50 6f 73 28 41 73 63 |rPos+Cha|rPos(Asc|
|00005700| 69 69 53 74 61 72 74 29 | 2b 43 68 61 72 50 6f 73 |iiStart)|+CharPos|
|00005710| 28 31 36 29 3b 0d 09 09 | 09 0d 09 09 09 4d 6f 76 |(16);...|.....Mov|
|00005720| 65 54 6f 28 41 64 64 72 | 50 6f 73 2b 43 68 61 72 |eTo(Addr|Pos+Char|
|00005730| 50 6f 73 28 41 73 63 69 | 69 53 74 61 72 74 29 2c |Pos(Asci|iStart),|
|00005740| 72 2e 62 6f 74 74 6f 6d | 29 3b 0d 09 09 09 69 66 |r.bottom|);....if|
|00005750| 20 28 67 43 6f 6c 6f 72 | 51 44 46 6c 61 67 29 0d | (gColor|QDFlag).|
|00005760| 09 09 09 09 48 69 6c 69 | 74 65 4d 6f 64 65 20 26 |....Hili|teMode &|
|00005770| 3d 20 7e 28 31 20 3c 3c | 20 68 69 6c 69 74 65 42 |= ~(1 <<| hiliteB|
|00005780| 69 74 29 3b 09 2f 2f 20 | 48 69 6c 69 74 65 20 75 |it);.// |Hilite u|
|00005790| 73 69 6e 67 20 48 69 6c | 69 74 65 20 43 6f 6c 6f |sing Hil|ite Colo|
|000057a0| 72 0d 09 09 09 4c 69 6e | 65 54 6f 28 72 2e 6c 65 |r....Lin|eTo(r.le|
|000057b0| 66 74 2c 72 2e 62 6f 74 | 74 6f 6d 29 3b 0d 0d 09 |ft,r.bot|tom);...|
|000057c0| 09 09 69 66 20 28 67 43 | 6f 6c 6f 72 51 44 46 6c |..if (gC|olorQDFl|
|000057d0| 61 67 29 0d 09 09 09 09 | 48 69 6c 69 74 65 4d 6f |ag).....|HiliteMo|
|000057e0| 64 65 20 26 3d 20 7e 28 | 31 20 3c 3c 20 68 69 6c |de &= ~(|1 << hil|
|000057f0| 69 74 65 42 69 74 29 3b | 09 2f 2f 20 48 69 6c 69 |iteBit);|.// Hili|
|00005800| 74 65 20 75 73 69 6e 67 | 20 48 69 6c 69 74 65 20 |te using| Hilite |
|00005810| 43 6f 6c 6f 72 0d 09 09 | 09 4c 69 6e 65 54 6f 28 |Color...|.LineTo(|
|00005820| 72 2e 6c 65 66 74 2c 72 | 2e 74 6f 70 29 3b 0d 09 |r.left,r|.top);..|
|00005830| 09 09 69 66 20 28 64 57 | 69 6e 2d 3e 73 74 61 72 |..if (dW|in->star|
|00005840| 74 53 65 6c 20 3e 3d 20 | 64 57 69 6e 2d 3e 65 64 |tSel >= |dWin->ed|
|00005850| 69 74 4f 66 66 73 65 74 | 29 20 7b 0d 09 09 09 09 |itOffset|) {.....|
|00005860| 69 66 20 28 67 43 6f 6c | 6f 72 51 44 46 6c 61 67 |if (gCol|orQDFlag|
|00005870| 29 0d 09 09 09 09 48 69 | 6c 69 74 65 4d 6f 64 65 |).....Hi|liteMode|
|00005880| 20 26 3d 20 7e 28 31 20 | 3c 3c 20 68 69 6c 69 74 | &= ~(1 |<< hilit|
|00005890| 65 42 69 74 29 3b 09 2f | 2f 20 48 69 6c 69 74 65 |eBit);./|/ Hilite|
|000058a0| 20 75 73 69 6e 67 20 48 | 69 6c 69 74 65 20 43 6f | using H|ilite Co|
|000058b0| 6c 6f 72 0d 09 09 09 09 | 4c 69 6e 65 54 6f 28 72 |lor.....|LineTo(r|
|000058c0| 2e 72 69 67 68 74 2c 72 | 2e 74 6f 70 29 3b 0d 09 |.right,r|.top);..|
|000058d0| 09 09 7d 0d 09 09 09 65 | 6c 73 65 0d 09 09 09 09 |..}....e|lse.....|
|000058e0| 4d 6f 76 65 54 6f 28 72 | 2e 72 69 67 68 74 2c 72 |MoveTo(r|.right,r|
|000058f0| 2e 74 6f 70 29 3b 0d 09 | 09 09 69 66 20 28 67 43 |.top);..|..if (gC|
|00005900| 6f 6c 6f 72 51 44 46 6c | 61 67 29 0d 09 09 09 09 |olorQDFl|ag).....|
|00005910| 48 69 6c 69 74 65 4d 6f | 64 65 20 26 3d 20 7e 28 |HiliteMo|de &= ~(|
|00005920| 31 20 3c 3c 20 68 69 6c | 69 74 65 42 69 74 29 3b |1 << hil|iteBit);|
|00005930| 09 2f 2f 20 48 69 6c 69 | 74 65 20 75 73 69 6e 67 |.// Hili|te using|
|00005940| 20 48 69 6c 69 74 65 20 | 43 6f 6c 6f 72 0d 09 09 | Hilite |Color...|
|00005950| 09 4c 69 6e 65 54 6f 28 | 72 2e 72 69 67 68 74 2c |.LineTo(|r.right,|
|00005960| 72 2e 62 6f 74 74 6f 6d | 29 3b 0d 0d 09 09 09 69 |r.bottom|);.....i|
|00005970| 66 20 28 4c 69 6e 65 4e | 62 72 28 73 74 61 72 74 |f (LineN|br(start|
|00005980| 29 20 3c 20 4c 69 6e 65 | 4e 62 72 28 65 6e 64 29 |) < Line|Nbr(end)|
|00005990| 2d 31 29 20 7b 0d 09 09 | 09 09 72 2e 74 6f 70 20 |-1) {...|..r.top |
|000059a0| 3d 20 48 65 61 64 65 72 | 48 65 69 67 68 74 2b 54 |= Header|Height+T|
|000059b0| 6f 70 4d 61 72 67 69 6e | 2b 4c 69 6e 65 4e 62 72 |opMargin|+LineNbr|
|000059c0| 28 73 74 61 72 74 29 2a | 4c 69 6e 65 48 65 69 67 |(start)*|LineHeig|
|000059d0| 68 74 2b 4c 69 6e 65 48 | 65 69 67 68 74 3b 0d 09 |ht+LineH|eight;..|
|000059e0| 09 09 09 72 2e 62 6f 74 | 74 6f 6d 20 3d 20 48 65 |...r.bot|tom = He|
|000059f0| 61 64 65 72 48 65 69 67 | 68 74 2b 54 6f 70 4d 61 |aderHeig|ht+TopMa|
|00005a00| 72 67 69 6e 2b 4c 69 6e | 65 4e 62 72 28 65 6e 64 |rgin+Lin|eNbr(end|
|00005a10| 29 2a 4c 69 6e 65 48 65 | 69 67 68 74 3b 0d 09 09 |)*LineHe|ight;...|
|00005a20| 09 09 72 2e 6c 65 66 74 | 20 3d 20 41 64 64 72 50 |..r.left| = AddrP|
|00005a30| 6f 73 2b 43 68 61 72 50 | 6f 73 28 48 65 78 53 74 |os+CharP|os(HexSt|
|00005a40| 61 72 74 29 2d 33 3b 0d | 09 09 09 09 72 2e 72 69 |art)-3;.|....r.ri|
|00005a50| 67 68 74 20 3d 20 41 64 | 64 72 50 6f 73 2b 43 68 |ght = Ad|drPos+Ch|
|00005a60| 61 72 50 6f 73 28 48 65 | 78 53 74 61 72 74 29 2b |arPos(He|xStart)+|
|00005a70| 48 65 78 50 6f 73 28 31 | 36 29 2d 33 3b 0d 09 09 |HexPos(1|6)-3;...|
|00005a80| 09 09 4d 6f 76 65 54 6f | 28 72 2e 6c 65 66 74 2c |..MoveTo|(r.left,|
|00005a90| 72 2e 74 6f 70 29 3b 0d | 09 09 09 09 69 66 20 28 |r.top);.|....if (|
|00005aa0| 67 43 6f 6c 6f 72 51 44 | 46 6c 61 67 29 0d 09 09 |gColorQD|Flag)...|
|00005ab0| 09 09 48 69 6c 69 74 65 | 4d 6f 64 65 20 26 3d 20 |..Hilite|Mode &= |
|00005ac0| 7e 28 31 20 3c 3c 20 68 | 69 6c 69 74 65 42 69 74 |~(1 << h|iliteBit|
|00005ad0| 29 3b 09 2f 2f 20 48 69 | 6c 69 74 65 20 75 73 69 |);.// Hi|lite usi|
|00005ae0| 6e 67 20 48 69 6c 69 74 | 65 20 43 6f 6c 6f 72 0d |ng Hilit|e Color.|
|00005af0| 09 09 09 09 4c 69 6e 65 | 54 6f 28 72 2e 6c 65 66 |....Line|To(r.lef|
|00005b00| 74 2c 72 2e 62 6f 74 74 | 6f 6d 29 3b 0d 09 09 09 |t,r.bott|om);....|
|00005b10| 09 4d 6f 76 65 54 6f 28 | 72 2e 72 69 67 68 74 2c |.MoveTo(|r.right,|
|00005b20| 72 2e 74 6f 70 29 3b 0d | 09 09 09 09 69 66 20 28 |r.top);.|....if (|
|00005b30| 67 43 6f 6c 6f 72 51 44 | 46 6c 61 67 29 0d 09 09 |gColorQD|Flag)...|
|00005b40| 09 09 48 69 6c 69 74 65 | 4d 6f 64 65 20 26 3d 20 |..Hilite|Mode &= |
|00005b50| 7e 28 31 20 3c 3c 20 68 | 69 6c 69 74 65 42 69 74 |~(1 << h|iliteBit|
|00005b60| 29 3b 09 2f 2f 20 48 69 | 6c 69 74 65 20 75 73 69 |);.// Hi|lite usi|
|00005b70| 6e 67 20 48 69 6c 69 74 | 65 20 43 6f 6c 6f 72 0d |ng Hilit|e Color.|
|00005b80| 09 09 09 09 4c 69 6e 65 | 54 6f 28 72 2e 72 69 67 |....Line|To(r.rig|
|00005b90| 68 74 2c 72 2e 62 6f 74 | 74 6f 6d 29 3b 0d 0d 09 |ht,r.bot|tom);...|
|00005ba0| 09 09 09 72 2e 6c 65 66 | 74 20 3d 20 41 64 64 72 |...r.lef|t = Addr|
|00005bb0| 50 6f 73 2b 43 68 61 72 | 50 6f 73 28 41 73 63 69 |Pos+Char|Pos(Asci|
|00005bc0| 69 53 74 61 72 74 29 2d | 31 3b 0d 09 09 09 09 72 |iStart)-|1;.....r|
|00005bd0| 2e 72 69 67 68 74 20 3d | 20 41 64 64 72 50 6f 73 |.right =| AddrPos|
|00005be0| 2b 43 68 61 72 50 6f 73 | 28 41 73 63 69 69 53 74 |+CharPos|(AsciiSt|
|00005bf0| 61 72 74 29 2b 43 68 61 | 72 50 6f 73 28 31 36 29 |art)+Cha|rPos(16)|
|00005c00| 3b 0d 09 09 09 09 4d 6f | 76 65 54 6f 28 72 2e 6c |;.....Mo|veTo(r.l|
|00005c10| 65 66 74 2c 72 2e 74 6f | 70 29 3b 0d 09 09 09 09 |eft,r.to|p);.....|
|00005c20| 69 66 20 28 67 43 6f 6c | 6f 72 51 44 46 6c 61 67 |if (gCol|orQDFlag|
|00005c30| 29 0d 09 09 09 09 48 69 | 6c 69 74 65 4d 6f 64 65 |).....Hi|liteMode|
|00005c40| 20 26 3d 20 7e 28 31 20 | 3c 3c 20 68 69 6c 69 74 | &= ~(1 |<< hilit|
|00005c50| 65 42 69 74 29 3b 09 2f | 2f 20 48 69 6c 69 74 65 |eBit);./|/ Hilite|
|00005c60| 20 75 73 69 6e 67 20 48 | 69 6c 69 74 65 20 43 6f | using H|ilite Co|
|00005c70| 6c 6f 72 0d 09 09 09 09 | 4c 69 6e 65 54 6f 28 72 |lor.....|LineTo(r|
|00005c80| 2e 6c 65 66 74 2c 72 2e | 62 6f 74 74 6f 6d 29 3b |.left,r.|bottom);|
|00005c90| 0d 09 09 09 09 4d 6f 76 | 65 54 6f 28 72 2e 72 69 |.....Mov|eTo(r.ri|
|00005ca0| 67 68 74 2c 72 2e 74 6f | 70 29 3b 0d 09 09 09 09 |ght,r.to|p);.....|
|00005cb0| 69 66 20 28 67 43 6f 6c | 6f 72 51 44 46 6c 61 67 |if (gCol|orQDFlag|
|00005cc0| 29 0d 09 09 09 09 48 69 | 6c 69 74 65 4d 6f 64 65 |).....Hi|liteMode|
|00005cd0| 20 26 3d 20 7e 28 31 20 | 3c 3c 20 68 69 6c 69 74 | &= ~(1 |<< hilit|
|00005ce0| 65 42 69 74 29 3b 09 2f | 2f 20 48 69 6c 69 74 65 |eBit);./|/ Hilite|
|00005cf0| 20 75 73 69 6e 67 20 48 | 69 6c 69 74 65 20 43 6f | using H|ilite Co|
|00005d00| 6c 6f 72 0d 09 09 09 09 | 4c 69 6e 65 54 6f 28 72 |lor.....|LineTo(r|
|00005d10| 2e 72 69 67 68 74 2c 72 | 2e 62 6f 74 74 6f 6d 29 |.right,r|.bottom)|
|00005d20| 3b 0d 09 09 09 7d 0d 09 | 09 09 72 2e 74 6f 70 20 |;....}..|..r.top |
|00005d30| 3d 20 48 65 61 64 65 72 | 48 65 69 67 68 74 2b 54 |= Header|Height+T|
|00005d40| 6f 70 4d 61 72 67 69 6e | 2b 4c 69 6e 65 4e 62 72 |opMargin|+LineNbr|
|00005d50| 28 65 6e 64 29 2a 4c 69 | 6e 65 48 65 69 67 68 74 |(end)*Li|neHeight|
|00005d60| 3b 0d 09 09 09 72 2e 62 | 6f 74 74 6f 6d 20 3d 20 |;....r.b|ottom = |
|00005d70| 72 2e 74 6f 70 2b 4c 69 | 6e 65 48 65 69 67 68 74 |r.top+Li|neHeight|
|00005d80| 3b 0d 09 09 09 72 2e 6c | 65 66 74 20 3d 20 41 64 |;....r.l|eft = Ad|
|00005d90| 64 72 50 6f 73 2b 43 68 | 61 72 50 6f 73 28 48 65 |drPos+Ch|arPos(He|
|00005da0| 78 53 74 61 72 74 29 2d | 33 3b 0d 09 09 09 72 2e |xStart)-|3;....r.|
|00005db0| 72 69 67 68 74 20 3d 20 | 41 64 64 72 50 6f 73 2b |right = |AddrPos+|
|00005dc0| 43 68 61 72 50 6f 73 28 | 48 65 78 53 74 61 72 74 |CharPos(|HexStart|
|00005dd0| 29 2b 48 65 78 50 6f 73 | 28 65 6e 64 58 29 2b 48 |)+HexPos|(endX)+H|
|00005de0| 65 78 57 69 64 74 68 2d | 33 3b 0d 09 09 09 4d 6f |exWidth-|3;....Mo|
|00005df0| 76 65 54 6f 28 72 2e 6c | 65 66 74 2c 72 2e 74 6f |veTo(r.l|eft,r.to|
|00005e00| 70 29 3b 0d 09 09 09 69 | 66 20 28 67 43 6f 6c 6f |p);....i|f (gColo|
|00005e10| 72 51 44 46 6c 61 67 29 | 0d 09 09 09 09 48 69 6c |rQDFlag)|.....Hil|
|00005e20| 69 74 65 4d 6f 64 65 20 | 26 3d 20 7e 28 31 20 3c |iteMode |&= ~(1 <|
|00005e30| 3c 20 68 69 6c 69 74 65 | 42 69 74 29 3b 09 2f 2f |< hilite|Bit);.//|
|00005e40| 20 48 69 6c 69 74 65 20 | 75 73 69 6e 67 20 48 69 | Hilite |using Hi|
|00005e50| 6c 69 74 65 20 43 6f 6c | 6f 72 0d 09 09 09 4c 69 |lite Col|or....Li|
|00005e60| 6e 65 54 6f 28 72 2e 6c | 65 66 74 2c 72 2e 62 6f |neTo(r.l|eft,r.bo|
|00005e70| 74 74 6f 6d 29 3b 0d 09 | 09 09 69 66 20 28 64 57 |ttom);..|..if (dW|
|00005e80| 69 6e 2d 3e 65 6e 64 53 | 65 6c 20 3c 20 64 57 69 |in->endS|el < dWi|
|00005e90| 6e 2d 3e 65 64 69 74 4f | 66 66 73 65 74 2b 64 57 |n->editO|ffset+dW|
|00005ea0| 69 6e 2d 3e 6c 69 6e 65 | 73 50 65 72 50 61 67 65 |in->line|sPerPage|
|00005eb0| 2a 31 36 29 20 7b 0d 09 | 09 09 09 69 66 20 28 67 |*16) {..|...if (g|
|00005ec0| 43 6f 6c 6f 72 51 44 46 | 6c 61 67 29 0d 09 09 09 |ColorQDF|lag)....|
|00005ed0| 09 48 69 6c 69 74 65 4d | 6f 64 65 20 26 3d 20 7e |.HiliteM|ode &= ~|
|00005ee0| 28 31 20 3c 3c 20 68 69 | 6c 69 74 65 42 69 74 29 |(1 << hi|liteBit)|
|00005ef0| 3b 09 2f 2f 20 48 69 6c | 69 74 65 20 75 73 69 6e |;.// Hil|ite usin|
|00005f00| 67 20 48 69 6c 69 74 65 | 20 43 6f 6c 6f 72 0d 09 |g Hilite| Color..|
|00005f10| 09 09 09 4c 69 6e 65 54 | 6f 28 72 2e 72 69 67 68 |...LineT|o(r.righ|
|00005f20| 74 2c 72 2e 62 6f 74 74 | 6f 6d 29 3b 0d 09 09 09 |t,r.bott|om);....|
|00005f30| 7d 0d 09 09 09 65 6c 73 | 65 0d 09 09 09 09 4d 6f |}....els|e.....Mo|
|00005f40| 76 65 54 6f 28 72 2e 72 | 69 67 68 74 2c 72 2e 62 |veTo(r.r|ight,r.b|
|00005f50| 6f 74 74 6f 6d 29 3b 0d | 09 09 09 69 66 20 28 67 |ottom);.|...if (g|
|00005f60| 43 6f 6c 6f 72 51 44 46 | 6c 61 67 29 0d 09 09 09 |ColorQDF|lag)....|
|00005f70| 09 48 69 6c 69 74 65 4d | 6f 64 65 20 26 3d 20 7e |.HiliteM|ode &= ~|
|00005f80| 28 31 20 3c 3c 20 68 69 | 6c 69 74 65 42 69 74 29 |(1 << hi|liteBit)|
|00005f90| 3b 09 2f 2f 20 48 69 6c | 69 74 65 20 75 73 69 6e |;.// Hil|ite usin|
|00005fa0| 67 20 48 69 6c 69 74 65 | 20 43 6f 6c 6f 72 0d 09 |g Hilite| Color..|
|00005fb0| 09 09 4c 69 6e 65 54 6f | 28 72 2e 72 69 67 68 74 |..LineTo|(r.right|
|00005fc0| 2c 72 2e 74 6f 70 29 3b | 0d 09 09 09 69 66 20 28 |,r.top);|....if (|
|00005fd0| 67 43 6f 6c 6f 72 51 44 | 46 6c 61 67 29 0d 09 09 |gColorQD|Flag)...|
|00005fe0| 09 09 48 69 6c 69 74 65 | 4d 6f 64 65 20 26 3d 20 |..Hilite|Mode &= |
|00005ff0| 7e 28 31 20 3c 3c 20 68 | 69 6c 69 74 65 42 69 74 |~(1 << h|iliteBit|
|00006000| 29 3b 09 2f 2f 20 48 69 | 6c 69 74 65 20 75 73 69 |);.// Hi|lite usi|
|00006010| 6e 67 20 48 69 6c 69 74 | 65 20 43 6f 6c 6f 72 0d |ng Hilit|e Color.|
|00006020| 09 09 09 4c 69 6e 65 54 | 6f 28 41 64 64 72 50 6f |...LineT|o(AddrPo|
|00006030| 73 2b 43 68 61 72 50 6f | 73 28 48 65 78 53 74 61 |s+CharPo|s(HexSta|
|00006040| 72 74 29 2b 48 65 78 50 | 6f 73 28 31 36 29 2d 33 |rt)+HexP|os(16)-3|
|00006050| 2c 72 2e 74 6f 70 29 3b | 0d 0d 09 09 09 72 2e 6c |,r.top);|.....r.l|
|00006060| 65 66 74 20 3d 20 41 64 | 64 72 50 6f 73 2b 43 68 |eft = Ad|drPos+Ch|
|00006070| 61 72 50 6f 73 28 41 73 | 63 69 69 53 74 61 72 74 |arPos(As|ciiStart|
|00006080| 29 2d 31 3b 0d 09 09 09 | 72 2e 72 69 67 68 74 20 |)-1;....|r.right |
|00006090| 3d 20 41 64 64 72 50 6f | 73 2b 43 68 61 72 50 6f |= AddrPo|s+CharPo|
|000060a0| 73 28 41 73 63 69 69 53 | 74 61 72 74 29 2b 43 68 |s(AsciiS|tart)+Ch|
|000060b0| 61 72 50 6f 73 28 65 6e | 64 58 29 2b 43 68 61 72 |arPos(en|dX)+Char|
|000060c0| 57 69 64 74 68 2d 31 3b | 0d 09 09 09 4d 6f 76 65 |Width-1;|....Move|
|000060d0| 54 6f 28 72 2e 6c 65 66 | 74 2c 72 2e 74 6f 70 29 |To(r.lef|t,r.top)|
|000060e0| 3b 0d 09 09 09 69 66 20 | 28 67 43 6f 6c 6f 72 51 |;....if |(gColorQ|
|000060f0| 44 46 6c 61 67 29 0d 09 | 09 09 09 48 69 6c 69 74 |DFlag)..|...Hilit|
|00006100| 65 4d 6f 64 65 20 26 3d | 20 7e 28 31 20 3c 3c 20 |eMode &=| ~(1 << |
|00006110| 68 69 6c 69 74 65 42 69 | 74 29 3b 09 2f 2f 20 48 |hiliteBi|t);.// H|
|00006120| 69 6c 69 74 65 20 75 73 | 69 6e 67 20 48 69 6c 69 |ilite us|ing Hili|
|00006130| 74 65 20 43 6f 6c 6f 72 | 0d 09 09 09 4c 69 6e 65 |te Color|....Line|
|00006140| 54 6f 28 72 2e 6c 65 66 | 74 2c 72 2e 62 6f 74 74 |To(r.lef|t,r.bott|
|00006150| 6f 6d 2d 31 29 3b 0d 09 | 09 09 69 66 20 28 64 57 |om-1);..|..if (dW|
|00006160| 69 6e 2d 3e 65 6e 64 53 | 65 6c 20 3c 20 64 57 69 |in->endS|el < dWi|
|00006170| 6e 2d 3e 65 64 69 74 4f | 66 66 73 65 74 2b 64 57 |n->editO|ffset+dW|
|00006180| 69 6e 2d 3e 6c 69 6e 65 | 73 50 65 72 50 61 67 65 |in->line|sPerPage|
|00006190| 2a 31 36 29 20 7b 0d 09 | 09 09 09 69 66 20 28 67 |*16) {..|...if (g|
|000061a0| 43 6f 6c 6f 72 51 44 46 | 6c 61 67 29 0d 09 09 09 |ColorQDF|lag)....|
|000061b0| 09 48 69 6c 69 74 65 4d | 6f 64 65 20 26 3d 20 7e |.HiliteM|ode &= ~|
|000061c0| 28 31 20 3c 3c 20 68 69 | 6c 69 74 65 42 69 74 29 |(1 << hi|liteBit)|
|000061d0| 3b 09 2f 2f 20 48 69 6c | 69 74 65 20 75 73 69 6e |;.// Hil|ite usin|
|000061e0| 67 20 48 69 6c 69 74 65 | 20 43 6f 6c 6f 72 0d 09 |g Hilite| Color..|
|000061f0| 09 09 09 4c 69 6e 65 54 | 6f 28 72 2e 72 69 67 68 |...LineT|o(r.righ|
|00006200| 74 2c 72 2e 62 6f 74 74 | 6f 6d 2d 31 29 3b 0d 09 |t,r.bott|om-1);..|
|00006210| 09 09 7d 0d 09 09 09 65 | 6c 73 65 0d 09 09 09 09 |..}....e|lse.....|
|00006220| 4d 6f 76 65 54 6f 28 72 | 2e 72 69 67 68 74 2c 72 |MoveTo(r|.right,r|
|00006230| 2e 62 6f 74 74 6f 6d 2d | 31 29 3b 0d 09 09 09 69 |.bottom-|1);....i|
|00006240| 66 20 28 67 43 6f 6c 6f | 72 51 44 46 6c 61 67 29 |f (gColo|rQDFlag)|
|00006250| 0d 09 09 09 09 48 69 6c | 69 74 65 4d 6f 64 65 20 |.....Hil|iteMode |
|00006260| 26 3d 20 7e 28 31 20 3c | 3c 20 68 69 6c 69 74 65 |&= ~(1 <|< hilite|
|00006270| 42 69 74 29 3b 09 2f 2f | 20 48 69 6c 69 74 65 20 |Bit);.//| Hilite |
|00006280| 75 73 69 6e 67 20 48 69 | 6c 69 74 65 20 43 6f 6c |using Hi|lite Col|
|00006290| 6f 72 0d 09 09 09 4c 69 | 6e 65 54 6f 28 72 2e 72 |or....Li|neTo(r.r|
|000062a0| 69 67 68 74 2c 72 2e 74 | 6f 70 29 3b 0d 09 09 09 |ight,r.t|op);....|
|000062b0| 69 66 20 28 67 43 6f 6c | 6f 72 51 44 46 6c 61 67 |if (gCol|orQDFlag|
|000062c0| 29 0d 09 09 09 09 48 69 | 6c 69 74 65 4d 6f 64 65 |).....Hi|liteMode|
|000062d0| 20 26 3d 20 7e 28 31 20 | 3c 3c 20 68 69 6c 69 74 | &= ~(1 |<< hilit|
|000062e0| 65 42 69 74 29 3b 09 2f | 2f 20 48 69 6c 69 74 65 |eBit);./|/ Hilite|
|000062f0| 20 75 73 69 6e 67 20 48 | 69 6c 69 74 65 20 43 6f | using H|ilite Co|
|00006300| 6c 6f 72 0d 09 09 09 4c | 69 6e 65 54 6f 28 41 64 |lor....L|ineTo(Ad|
|00006310| 64 72 50 6f 73 2b 43 68 | 61 72 50 6f 73 28 41 73 |drPos+Ch|arPos(As|
|00006320| 63 69 69 53 74 61 72 74 | 29 2b 43 68 61 72 50 6f |ciiStart|)+CharPo|
|00006330| 73 28 31 36 29 2c 72 2e | 74 6f 70 29 3b 0d 09 09 |s(16),r.|top);...|
|00006340| 7d 0d 09 09 65 6c 73 65 | 20 7b 0d 09 09 09 72 2e |}...else| {....r.|
|00006350| 74 6f 70 20 3d 20 48 65 | 61 64 65 72 48 65 69 67 |top = He|aderHeig|
|00006360| 68 74 2b 54 6f 70 4d 61 | 72 67 69 6e 2b 4c 69 6e |ht+TopMa|rgin+Lin|
|00006370| 65 4e 62 72 28 73 74 61 | 72 74 29 2a 4c 69 6e 65 |eNbr(sta|rt)*Line|
|00006380| 48 65 69 67 68 74 3b 0d | 09 09 09 72 2e 62 6f 74 |Height;.|...r.bot|
|00006390| 74 6f 6d 20 3d 20 72 2e | 74 6f 70 2b 4c 69 6e 65 |tom = r.|top+Line|
|000063a0| 48 65 69 67 68 74 3b 0d | 09 09 09 72 2e 6c 65 66 |Height;.|...r.lef|
|000063b0| 74 20 3d 20 41 64 64 72 | 50 6f 73 2b 43 68 61 72 |t = Addr|Pos+Char|
|000063c0| 50 6f 73 28 48 65 78 53 | 74 61 72 74 29 2b 48 65 |Pos(HexS|tart)+He|
|000063d0| 78 50 6f 73 28 73 74 61 | 72 74 58 29 2d 33 3b 0d |xPos(sta|rtX)-3;.|
|000063e0| 09 09 09 72 2e 72 69 67 | 68 74 20 3d 20 41 64 64 |...r.rig|ht = Add|
|000063f0| 72 50 6f 73 2b 43 68 61 | 72 50 6f 73 28 48 65 78 |rPos+Cha|rPos(Hex|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.